I'm using a macOS X 10.8.4 64 bit. I want to build some C/C++ programs on my Mac, and then show them to some people who use Windows. I can successfully compile it into an exe, using g++ test.cpp -o test.exe But when run in my PC, that exe file raises this error: This version of this file is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program. Note: My PC is also 64 bits
I'm using a mac OS X 10.8.4 64 bit. I want to build some C/C++ programs on my mac, and then show them to some people who use windows. I can successfully compile it into an exe, using g++ test.cpp -o test.exe on the terminal But when run in my PC, that exe file raises this error: "This verison of this file is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need an x86 (32-bit) or x64 (64-bit) verion of the program." Note: My PC is also 64 bits
I am trying to write a script that could be used to import data from a sheet in excel into my QTP Data table. Below is the script . But even though the script runs successfully, I cannot seem to get the data pop up in the data table. Any help is greatly appreciated. datatable.Import Sheet "C:\Documents and settings\Administrator\Desktop\Book1.xlsx",Sheet1,Action1
How can I do debug/inspect element of APK webview. I have tried the remote debugging instructions from the docs, but it is helpful only for chrome not for APKs.
I'm looking into the feasibility of adding NaN/Infinity support to a pre-existing scientific application that uses JSONRPC for client/server interactions. Many JSON libs do handle (optionally in some cases) NaNs and Infs, for example: Python json reads and writes Java Jackson reads but writes strings instead of barewords Java GSON reads and writes Javascript can read I'm aware that NaN and Infinity are not supported in the JSON spec, and am aware of the related questions. However, AFAICT the question of whether there's some way of coercing the native JS JSON.stringify() method to emit NaN/Infi
I have run into an issue. Whenever I run my test class it is showing the following error: Testsuite: com.lo.test.selenium.AssignCampaignTestCase Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 46.991 sec ------------- Standard Error ----------------- org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: Xlib: extension "RANDR" missing on display ":99". *** LOG addons.manager: Application has been upgraded *** LOG addons.xpi: startup *** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on
I have read that the following results in undefined behavior. strcmp(foo, NULL); But what exactly happens "underneath the hood," so to speak? Is foo compared to garbage data? Is NULL dereferenced? What are the details that cause "undefined behavior"?
I want to upload a video file using PHP and show the progress of the upload via an Progress Bar. But this is more difficult like i thought and i tried to put the pieces ive found together but unfortunately i didnt found a working piece of code that has the needed php, ajax and html code all together, so ive tried to put different pieces together. My Code functions nearly completely. The only thing is, that the current process of the file upload, which i've got in percent, is loaded by my javascript only AFTER the process has ended, and not from the beginning. Here is my PHP Code: function file
My question is related to that one: git-new-workdir: Commit in working tree A causes bogus changes in tree B. I use git-new-workdir to have multiple working directories from the same Git repository. Usually, I have work on different branches in each working directory, but it may happen that I commit in branch from a given working directory, while another working directory is a checkout of the same branch. When that happens, the second working directory gets staged changes that are the reverse of the commit I just did. Now comes my question... How can one discard staged changes, without discard
Is there any way to r(?)sync in a Linux command line a timestamps only for files which have equal contents only? I.e. some directory structure was copied without coping of a timestamps and then modified independently. Now there is need to copy a timestamps of equal files only to simplify further synchronization.
Assuming program logic changes a button tag based on something random - but using the UI thread. Is the Button Tag value reliable to use in a click event? i.e. Will it be the same value as-at the time of the event handler as it was at the time of the click? If not, what is the best method to pass an event specific parameter into a button click event that will be safe? Update Added an example as requested. (Remember this is just theoretical). Windows.Forms.Timer timer = new Timer(); timer.Interval = 1; timer.Tick += new EventHandler(timer_tick); timer.Start(); void timer_tick(object sender, Eve
So I am making a tic tac toe game with user friendly GUI interface. I have almost completed the game but there seems to be a problem with my checkWin function. Up to this point, everything was working just fine until I added the checkWin function and the parameters associated it with it. Before I implemented the checkWin function, you would press a button, it would be marked X and then there would be an automated computer move that would place an O randomly on the board where there isn't an X. Code is posted below. When I run the code, and you press a button, the applet just freezes and you ca
Is it possible to remove legend elements corresponding to certain factor levels? In my example, I wish to remove legend entries for the grey factor levels (1-5), and only keep the levels "Best", "Suggested", and "Worst". I have tried a number of hacks already, but most of them have either removed the grey coloring of the bars (in groups of 25 each) or only left me with the bars that I colored red, yellow, and green. # ggplot2 barplot <- ggplot(training_results.barplot, mapping=aes(x=name, fill=factor(a))) # filling based on a column ##mapping=aes(x=name, fill=factor(a)) barplot <- barplot + ge
Given a DataFrame with a column "BoolCol", we want to find the indexes of the DataFrame in which the values for "BoolCol" == True I currently have the iterating way to do it, which works perfectly: for i in range(100,3000): if df.iloc[i]['BoolCol']== True: print (i,df.iloc[i]['BoolCol']) But this is not the correct pandas way to do it. After some research, I am currently using this code: df[df['BoolCol'] == True].index.tolist() This one gives me a list of indexes, but they don't match, when I check them by doing: df.iloc[i]['BoolCol'] The result is actually False!! Which would be the correct p
i have problem in crystall report, Here is my code following many reference site in google, // {@reset} //place in group header whileprintingrecords; global numbervar Sum_Cumm_Sum:=0; // {@increment} //place in section detail whileprintingrecords; global numbervar Sum_Cumm_Sum:=Sum_Cumm_Sum+{@getIP}; // {@display} //place in group footer whileprintingrecords; global numbervar Sum_Cumm_Sum; Where getIP is Formula, {#sumKN}/{#sumSKS} and code in it is running total field with reset on change group, {#sumKN} is running total field for field KN {#sumSKS} = is running total field for field SKS ====
I have code similar to the following: #include <boost/optional.hpp> ::boost::optional<int> getitem(); int go(int nr) { boost::optional<int> a = getitem(); boost::optional<int> b; if (nr > 0) b = nr; if (a != b) return 1; return 0; } When compiling with GCC 4.7.2 with Boost 1.53, using the following command: g++ -c -O2 -Wall -DNDEBUG The following warning is issued: 13:3: warning: ‘((void)& b +4)’ may be used uninitialized in this function [-Wmaybe-uninitialized] Apparently, the root problem lies with GCC. See GCC Bugzilla Does anyone know a workaround?
I am trying to delete a named Worksheet from an .xlsm file. I followed the example posted here but it is not working for me. When I open the .xlsm file to check whether the Worksheet has been deleted, it is still there. Here is my code: $file2 = 'c:\file.xlsm' # destination's fullpath $xl = new-object -c excel.application $xl.displayAlerts = $false # don't prompt the user $wb2 = $xl.workbooks.open($file2) # open target $sh2_wb2 = $wb2.sheets | where {$_.name -eq "myWorksheet"} $sh2_wb2.delete() #Delete original sheet in template $wb2.close($true) # close and save destination workbook $xl.quit(
What are the purposes of/when are logic gates, multiplexers, and decoders used at the machine level? For example, I would guess that logic gates are probably used at the machine level when a programmer uses an if statement in a high level language. But what about multiplexers and decoders? What kinds of statements or programming concepts can you make in a language like Java that would translate to a multiplexer or decoder at the machine level? If you just put a multiplexer down in front of me and give me some inputs I can tell you what the output will be, I understand the concept as a complete
I would like to have a scoped variable in Spring. In Guice it is very simple: @Singleton class MyBean { @Inject @Named("session-scoped") private Provider<Integer> someString; void doSomething() { // returns a random number for a current session. // Each user session should generate new number, // but one session should keep the same number. Integer n1 = someString.get(); Integer n2 = someString.get(); assert n1 == n2; } } ... class MyModule extends AbstractModule { @Override protected void configure() { ... } @Provides @SessionScoped @Named("session-scoped") Integer someString() { return new R
I have read a number of articles on how to configure mirroring on SQL Server 2012. I went through the steps and everything worked until hitting the final step, which didn't work. When I run this on the Principal: ALTER DATABASE MyDBName SET PARTNER = 'TCP://1.2.3.4:5022'; I get this error: The server network address "TCP://1.2.3.4:5022" can not be reached or does not exist. When I run the counterpart ALTER statement shown above, but on the Mirror, it works fine. I have tried all the steps in this troubleshooting article. Important points: The Primary and Mirror servers are in different datacen
Im trying to implement a date picker in my form however when the code it added the date picker does not display in the brewers. When the console is inspected this error is posted TypeError: 'undefined' is not a function (evaluating '$( "#datepicker" ).datepicker()') The jQuery library file is added in the root folder. Bellow is the code used: $(document).ready(function() { $( "#datepicker" ).datepicker(); }); <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Datepicker</title> <link rel="stylesheet" href="jquery-ui-1.10.4.custom.css"> <script src="jquery-1.10.2.js"></script
SOLVED, solution is underneath. I want to replace buttons for navigation in webview to 2 swipe gestures - left and right swipe. This Android: How to handle right to left swipe gestures link really helped me, but I encountered problem - after implementing this code I was unable to click on links/ or scroll through loaded webpage in webview activity(I have used 1st answer from possible answers). Then I found out that in another answer in this question is something similar - how to scroll in listview - https://stackoverflow.com/a/20005481/3272449, but I wasn't able to get it running. In logcat i
I have been looking for a way in which I can map two split files into an online player. For example if I have .mp4.001 file and .mp4.002 file in one folder VLC media player automatically finds all the connected files in the same folder and plays a complete uninterrupted video. Now what I want is an online player ofcourse in HTML5 in which I can map all the files which are in different locations. eg. src=http://www.xxx.xxx/abc.mp4.001 src=http://www.xys.xxx/abc.mp4.002 src=http://www.xyz.xxx/abc.mp4.003 I was not able to find any player also I am not sure if this is possible. Kindly help.
I'm making RESTful API using Tastypie, and when I try to POST/PUT/DELETE a request it says: "detail": "CSRF Failed: CSRF token missing or incorrect.". It works fine with GET. I've read various threads on SO, saying: to delete the cookies or use @csrf_exempt or use @method_decorator(csrf_exempt) but neither of it worked. How can I over-pass this error? views.py class SnippetList(mixins.ListModelMixin, mixins.CreateModelMixin, generics.GenericAPIView): queryset = Snippet.objects.all() serializer_class = SnippetSerializer def get(self, request, *args, **kwargs): return self.list(request, *args, *
I got problem on this code: String charitysql = "SELECT wardName, charityRoomID FROM tbl_charityward,tbl_charityroom2 WHERE tbl_charityward.charityWardID = tbl_charityroom2.charityWardID"; try { pst = conn.prepareStatement(charitysql); rs = pst.executeQuery(); while (rs.next()) { String wardname = rs.getString("wardName"); cb_ward2.addItem(wardname); String roomid = rs.getString("charityRoomID"); cb_room2.addItem(roomid); } } catch(Exception e) { JOptionPane.showMessageDialog(null, e); } this is my tables structure: tbl_charityward charityWardID int NOT NULL AUTO_INCREMENT, wardName varchar(20
I was given the task of producing high-level design documents, describing flows of a new development project. The project's specifications contains a few flow-charts of the project's use cases. These tend to be packed with data, including branches (decisions that determine multiple paths) and loops (flows that return to a previous state). Attempting to describe these using traditional sequence diagrams hit a well, as (to me) it seems that these are better used for things that are more "single direction" in their nature, with no control flows, etc. What is the optimal way of creating high-level
I have a string containing an integer (which has been read from a file). I'm trying to convert the string to an int using strconv.ParseInt(). ParseInt requires that I provide a bitsize (bit sizes 0, 8, 16, 32, and 64 correspond to int, int8, int16, int32, and int64). The integer read from the file is small (i.e. it should fit in a normal int). If I pass a bitsize of 0, however, I get a result of type int64 (presumably because I'm running on a 64-bit OS). Why is this happening? How do I just get a normal int? (If someone has a quick primer on when and why I should use the different int types, t
I have a set of icons that transition from the center of the page to a set point, and then remain there. What I want to do is set them to transition to have a thicker border and scale to 130x130px whenever I mouse over one of them, but only the initial animation occurs CSS: .iconborder { border-width: 5px; border-style: solid; border-radius: 100em; border-color: white; } .iconborder:hover {animation-name: icongrow; animation-duration: 0.2s; animation-timing-function: cubic-bezier;} @keyframes icongrow { 0% { border-width: 5px; width: 100px; height: 100px; } 100% { border-width: 10px; width: 13
Suppose I have an xml file with request/response and wsdl file. How I can validate request/response by wsdl? Important I know that it is possible to enable such validation with container like Spring-Ws or Metro, but I want manual validation without container like that: public static void main (String[] arg) { File xmlRequest = new File(arg[0]); File wsdlFile = new File(arg[1]); //.... someValidator.validate(xmlRequest, wsdlFile); }
According to this post, manually-entered APNs are contained here: /data/data/com.android.settings/shared_prefs/com.android.settings_preferences.xml However, this file can't be accessed using adb shell cat or adb pull. Is there any workaround for a non-rooted device?