qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
28,831,729
Currently my code works fine but should I replace `raf.read()` to `raf.readFully()` in order to ensure that all bytes will be read? ``` raf = new RandomAccessFile(doc.getFilePath()+"/"+doc.getName(),"r"); raf.seek((partNumber-1)*partitionSize); byte[] buf = new byte[partitionSize]; ...
2015/03/03
[ "https://Stackoverflow.com/questions/28831729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2104560/" ]
The `read` method does not guarantee to read all requested bytes (even if they exist in the file). The actual behavior is going to be dependent on the underlying OS and file system. For example, when backed by NFS, you may be more likely to not get all the requested bytes in a single call. If you want to guarantee to ...
As it is in documentation for [RandomAccessFile#read(byte[] b)](http://docs.oracle.com/javase/7/docs/api/java/io/RandomAccessFile.html#read%28byte%5B%5D%29) > > Returns: > the total number of bytes read into the buffer, or -1 if there is no more data because the end of this file has been reached. > > >
39,791,663
I have a grid with some items, and when I click any item I move the content of that item to a modal. The modal works great, but when I remove the content from the item, a space appears above the item. I know that a way around this problem could be using a flexbox, which works fine, but I want to understand what is g...
2016/09/30
[ "https://Stackoverflow.com/questions/39791663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5452969/" ]
Use `vertical-align: top` to `item` and you can get rid of the *mystery space* when the contents of any item is empty. This happens because the `grid` items are `inline` (inline-flex). > > Note that > `vertical-align` applies to all *inline-level* and *table-cell* > elements and is used to vertically align inline l...
This is happening because of using `visibility:hidden`, `visibility:hidden` only hides visibility of element, and element still acquires space, you should use `display:none;` rather than `visibility:hidden` <https://jsfiddle.net/67w721zq/1/>
39,791,663
I have a grid with some items, and when I click any item I move the content of that item to a modal. The modal works great, but when I remove the content from the item, a space appears above the item. I know that a way around this problem could be using a flexbox, which works fine, but I want to understand what is g...
2016/09/30
[ "https://Stackoverflow.com/questions/39791663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5452969/" ]
Solutions --------- > > I know that a way around this problem could be using a flexbox... > > > That is correct. Making the parent of the items a flex container solves the problem: ``` .grid { display: flex; /* new */ flex-wrap: wrap; /* new */ margin-top: 100px; font-size: 0; border: 1px solid r...
This is happening because of using `visibility:hidden`, `visibility:hidden` only hides visibility of element, and element still acquires space, you should use `display:none;` rather than `visibility:hidden` <https://jsfiddle.net/67w721zq/1/>
39,791,663
I have a grid with some items, and when I click any item I move the content of that item to a modal. The modal works great, but when I remove the content from the item, a space appears above the item. I know that a way around this problem could be using a flexbox, which works fine, but I want to understand what is g...
2016/09/30
[ "https://Stackoverflow.com/questions/39791663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5452969/" ]
Solutions --------- > > I know that a way around this problem could be using a flexbox... > > > That is correct. Making the parent of the items a flex container solves the problem: ``` .grid { display: flex; /* new */ flex-wrap: wrap; /* new */ margin-top: 100px; font-size: 0; border: 1px solid r...
Use `vertical-align: top` to `item` and you can get rid of the *mystery space* when the contents of any item is empty. This happens because the `grid` items are `inline` (inline-flex). > > Note that > `vertical-align` applies to all *inline-level* and *table-cell* > elements and is used to vertically align inline l...
64,061,876
I have a asp.net core 3.1 MVC project. It has Identity added to it. When I normally click a button to go to login page or registration page, it works as expected. However the moment I am using **[Authorize]** on controller or global authorization filter in *Startup.cs* file, the page does not redirect to the login page...
2020/09/25
[ "https://Stackoverflow.com/questions/64061876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6120722/" ]
From my point of view, your program just terminates, and thus all windows are implicitly closed, regardless of which key you press. One idea might be to put a `while True` loop around the reading and checking of the pressed key: ```py import cv2 img = cv2.imread('path/to/your/image.png') cv2.imshow('My Image', img) ...
Try this, it will wait for key 'q' to be pressed. ``` import cv2 img = cv2.imread("MyImage.png") cv2.imshow('My Image', img) if cv2.waitKey(0) & 0xFF == ord('q'): cv2.destroyAllWindows() ``` HIH.
64,061,876
I have a asp.net core 3.1 MVC project. It has Identity added to it. When I normally click a button to go to login page or registration page, it works as expected. However the moment I am using **[Authorize]** on controller or global authorization filter in *Startup.cs* file, the page does not redirect to the login page...
2020/09/25
[ "https://Stackoverflow.com/questions/64061876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6120722/" ]
From my point of view, your program just terminates, and thus all windows are implicitly closed, regardless of which key you press. One idea might be to put a `while True` loop around the reading and checking of the pressed key: ```py import cv2 img = cv2.imread('path/to/your/image.png') cv2.imshow('My Image', img) ...
Simply do this: ``` img = cv2.imread("MyImage.png") cv2.imshow('My Image', img) k = cv2.waitKey(0) print(k) if k == 27: # close on ESC key cv2.destroyAllWindows() ``` I have simply removed `& 0xFF` from it. This works for me but I don't why this would pose a problem as it is simply applying and operation with `...
64,061,876
I have a asp.net core 3.1 MVC project. It has Identity added to it. When I normally click a button to go to login page or registration page, it works as expected. However the moment I am using **[Authorize]** on controller or global authorization filter in *Startup.cs* file, the page does not redirect to the login page...
2020/09/25
[ "https://Stackoverflow.com/questions/64061876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6120722/" ]
From my point of view, your program just terminates, and thus all windows are implicitly closed, regardless of which key you press. One idea might be to put a `while True` loop around the reading and checking of the pressed key: ```py import cv2 img = cv2.imread('path/to/your/image.png') cv2.imshow('My Image', img) ...
If you want to use specific key, you can use `ord()`: ``` img = cv2.imread('path/to/your/image.png') cv2.imshow('My Image', img) while True: k = cv2.waitKey(0) & 0xFF print(k) if k == ord('c'): # you can put any key here cv2.destroyAllWindows() break ```
40,912,181
I am currently modifying this tutorial from <https://www.simplifiedios.net/swift-php-mysql-tutorial/> . The purpose of the program is to close a ViewController if the correct message is recieved and to display a UIAltertAction if an invalid message is recieved. Could there be something that i am missing that "notChangi...
2016/12/01
[ "https://Stackoverflow.com/questions/40912181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7236401/" ]
Check Google documentation for findFragmentByTag() [here](https://developer.android.com/guide/components/fragments.html#Managing). You can also use **addToBackStack()** while calling the fragment from FragmentTransaction
Just use `addToBackStack(null)` before commit when you make fragment transactions and then when you press the back button you will get back to your fragment.
40,912,181
I am currently modifying this tutorial from <https://www.simplifiedios.net/swift-php-mysql-tutorial/> . The purpose of the program is to close a ViewController if the correct message is recieved and to display a UIAltertAction if an invalid message is recieved. Could there be something that i am missing that "notChangi...
2016/12/01
[ "https://Stackoverflow.com/questions/40912181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7236401/" ]
Just use `addToBackStack(null)` before commit when you make fragment transactions and then when you press the back button you will get back to your fragment.
Old question, but anyone looking for an answer to this can just do this: ``` @Override public void onBackPressed() { finish(); } ``` `finish()` "closes" the current Activity and takes you back to the Fragment (Actually, it takes you back to the Activity hosting the Fragment)
40,912,181
I am currently modifying this tutorial from <https://www.simplifiedios.net/swift-php-mysql-tutorial/> . The purpose of the program is to close a ViewController if the correct message is recieved and to display a UIAltertAction if an invalid message is recieved. Could there be something that i am missing that "notChangi...
2016/12/01
[ "https://Stackoverflow.com/questions/40912181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7236401/" ]
Check Google documentation for findFragmentByTag() [here](https://developer.android.com/guide/components/fragments.html#Managing). You can also use **addToBackStack()** while calling the fragment from FragmentTransaction
Old question, but anyone looking for an answer to this can just do this: ``` @Override public void onBackPressed() { finish(); } ``` `finish()` "closes" the current Activity and takes you back to the Fragment (Actually, it takes you back to the Activity hosting the Fragment)
29,464,671
I am working on an exercise about CSS 3 animation. I am stuck on how to keep the item falling down the page at full speed without requiring the user to follow it down with the mouse without resorting to javascript. So just when you hover the mouse over the box the box will fall down. Here is my code: ``` <p class="ex...
2015/04/06
[ "https://Stackoverflow.com/questions/29464671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3222088/" ]
One option would be to do something like ``` WITH ranges AS ( SELECT '[300, 499]' description, 300 min_val, 499 max_val FROM dual UNION ALL SELECT '[500, 699]' description, 500 min_val, 699 max_val FROM dual UNION ALL SELECT '[700, 850]' description, 700 min_val, 850 max_val FROM dual ) SELECT r.description,...
You can use `unpivot` in this case. Your answer- ``` Select * From ( Select Sum(Col1) "[300, 499]", Sum(Col2) "[500, 699]", Sum(Col3) "[700, 850]" From ( Select Case When Creditscore Between 300 And 499 Then 1 Else 0 End As Col1, Case When Creditscore B...
32,304,213
I'm developing an app using [PhoneGap](http://phonegap.com/). So, it's a web app. In this app, I have a requirement to embed a YouTube video and autoplay it whenever the user navigates to that particular page. I've read that HTML5 video autoplay doesn't work on mobile devices because of bandwidth concers. My question ...
2015/08/31
[ "https://Stackoverflow.com/questions/32304213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1135804/" ]
As you pointed out yourself, all autoplay instructions in your code itself will be ignored on load. So we'll implement a function that gets the video in the body and starts playing it. The following javascript code could do this: ``` (function() { document.getElementsByTagName('video')[0].play(); })() ``` To ex...
There is a [cordova/phonegap plugin](https://github.com/simplec-dev/AndroidMediaGestureSetting) that promises to do this. It rely on the Webview method [setMediaPlaybackRequiresUserGesture](http://developer.android.com/reference/android/webkit/WebSettings.html#setMediaPlaybackRequiresUserGesture(boolean)), added in API...
26,206
I want my textfield to stand out, because users can work with the rest of the page only after they filled it in. The interface is clean and strict, so I can probably add some color to grab attention. Do you have any suggestions?
2012/09/27
[ "https://ux.stackexchange.com/questions/26206", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/19210/" ]
Though highlighting as this example below will draw attention to your text field,it is not a very good way since it would just stand out and would disturb the overall flow. ![enter image description here](https://i.stack.imgur.com/djQzt.jpg) Since you want to allow other users to enter data only after that text fiel...
Any UI control can have the input focus. You can give the input focus to your textbox explicitly when your page is loaded. This way, the user will already see the blinking caret there. You can see this behavior on google.com Also, most UI controls have a disabled state. When disabled, they are usually grayed out and c...
26,206
I want my textfield to stand out, because users can work with the rest of the page only after they filled it in. The interface is clean and strict, so I can probably add some color to grab attention. Do you have any suggestions?
2012/09/27
[ "https://ux.stackexchange.com/questions/26206", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/19210/" ]
I would suggest fading out the rest of the form partially until the user has filled out the required field. This makes it clear that there's more for the user to do on that page, but that the first field (the only one that's shown at full opacity) is the only thing they can interact with yet. ![enter image description...
Any UI control can have the input focus. You can give the input focus to your textbox explicitly when your page is loaded. This way, the user will already see the blinking caret there. You can see this behavior on google.com Also, most UI controls have a disabled state. When disabled, they are usually grayed out and c...
30,376,598
I have built a simple GUI that takes in unorganized HTML code and organizes it...now that I have it working finally I need to learn how to distribute it. I managed to create my .jar file but when I try to run it I get "Error: could not find or failed to load main class HTMLFormatter.class" Here's what I did: First, I...
2015/05/21
[ "https://Stackoverflow.com/questions/30376598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4871354/" ]
The build-in `.npy` file format is perfectly fine for working with small datasets, without relying on external modules other then `numpy`. However, when you start having large amounts of data, the use of a file format, such as HDF5, designed to handle such datasets, is to be preferred [[1]](https://stackoverflow.com/a...
I made a library to create Numpy `.npy` files that are larger than the main memory of the machine by appending on the zero axis. The file can then be read with `mmap_mode="r"`. <https://pypi.org/project/npy-append-array> Installation ============ `conda install -c conda-forge npy-append-array` or `pip install npy-...
30,376,598
I have built a simple GUI that takes in unorganized HTML code and organizes it...now that I have it working finally I need to learn how to distribute it. I managed to create my .jar file but when I try to run it I get "Error: could not find or failed to load main class HTMLFormatter.class" Here's what I did: First, I...
2015/05/21
[ "https://Stackoverflow.com/questions/30376598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4871354/" ]
This is an expansion on Mohit Pandey's answer showing a full save / load example. It was tested using Python 3.6 and Numpy 1.11.3. ``` from pathlib import Path import numpy as np import os p = Path('temp.npy') with p.open('ab') as f: np.save(f, np.zeros(2)) np.save(f, np.ones(2)) with p.open('rb') as f: ...
you can try something like reading the file then add new data ``` import numpy as np import os.path x = np.arange(10) #[0 1 2 3 4 5 6 7 8 9] y = np.load("save.npy") if os.path.isfile("save.npy") else [] #get data if exist np.save("save.npy",np.append(y,x)) #save the new ``` after 2 operation: ``` print(np.load("...
30,376,598
I have built a simple GUI that takes in unorganized HTML code and organizes it...now that I have it working finally I need to learn how to distribute it. I managed to create my .jar file but when I try to run it I get "Error: could not find or failed to load main class HTMLFormatter.class" Here's what I did: First, I...
2015/05/21
[ "https://Stackoverflow.com/questions/30376598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4871354/" ]
For appending data to an already existing file using numpy.save, we should use: ``` f_handle = file(filename, 'a') numpy.save(f_handle, arr) f_handle.close() ``` I have checked that it works in python 2.7 and numpy 1.10.4 I have adapted the code from [here](https://mail.scipy.org/pipermail/numpy-discussion/2007-Nov...
The following is based upon PaxRomana99's answer. It creates a class that you can use to save and load the arrays. Ideally, one would also change the header of the npy file every time a new array is added in order to modify the description of the shape (see [here](https://numpy.org/devdocs/reference/generated/numpy.lib...
30,376,598
I have built a simple GUI that takes in unorganized HTML code and organizes it...now that I have it working finally I need to learn how to distribute it. I managed to create my .jar file but when I try to run it I get "Error: could not find or failed to load main class HTMLFormatter.class" Here's what I did: First, I...
2015/05/21
[ "https://Stackoverflow.com/questions/30376598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4871354/" ]
`.npy` files contain header which has shape and dtype of the array in it. If you know what your resulting array looks like, you can write header yourself and then data in chunks. E.g., here is the code for concatenating 2d matrices: ``` import numpy as np import numpy.lib.format as fmt def get_header(fnames): dty...
The following is based upon PaxRomana99's answer. It creates a class that you can use to save and load the arrays. Ideally, one would also change the header of the npy file every time a new array is added in order to modify the description of the shape (see [here](https://numpy.org/devdocs/reference/generated/numpy.lib...
30,376,598
I have built a simple GUI that takes in unorganized HTML code and organizes it...now that I have it working finally I need to learn how to distribute it. I managed to create my .jar file but when I try to run it I get "Error: could not find or failed to load main class HTMLFormatter.class" Here's what I did: First, I...
2015/05/21
[ "https://Stackoverflow.com/questions/30376598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4871354/" ]
`.npy` files contain header which has shape and dtype of the array in it. If you know what your resulting array looks like, you can write header yourself and then data in chunks. E.g., here is the code for concatenating 2d matrices: ``` import numpy as np import numpy.lib.format as fmt def get_header(fnames): dty...
For appending data to an already existing file using numpy.save, we should use: ``` f_handle = file(filename, 'a') numpy.save(f_handle, arr) f_handle.close() ``` I have checked that it works in python 2.7 and numpy 1.10.4 I have adapted the code from [here](https://mail.scipy.org/pipermail/numpy-discussion/2007-Nov...
30,376,598
I have built a simple GUI that takes in unorganized HTML code and organizes it...now that I have it working finally I need to learn how to distribute it. I managed to create my .jar file but when I try to run it I get "Error: could not find or failed to load main class HTMLFormatter.class" Here's what I did: First, I...
2015/05/21
[ "https://Stackoverflow.com/questions/30376598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4871354/" ]
I made a library to create Numpy `.npy` files that are larger than the main memory of the machine by appending on the zero axis. The file can then be read with `mmap_mode="r"`. <https://pypi.org/project/npy-append-array> Installation ============ `conda install -c conda-forge npy-append-array` or `pip install npy-...
The following is based upon PaxRomana99's answer. It creates a class that you can use to save and load the arrays. Ideally, one would also change the header of the npy file every time a new array is added in order to modify the description of the shape (see [here](https://numpy.org/devdocs/reference/generated/numpy.lib...
30,376,598
I have built a simple GUI that takes in unorganized HTML code and organizes it...now that I have it working finally I need to learn how to distribute it. I managed to create my .jar file but when I try to run it I get "Error: could not find or failed to load main class HTMLFormatter.class" Here's what I did: First, I...
2015/05/21
[ "https://Stackoverflow.com/questions/30376598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4871354/" ]
This is an expansion on Mohit Pandey's answer showing a full save / load example. It was tested using Python 3.6 and Numpy 1.11.3. ``` from pathlib import Path import numpy as np import os p = Path('temp.npy') with p.open('ab') as f: np.save(f, np.zeros(2)) np.save(f, np.ones(2)) with p.open('rb') as f: ...
For appending data to an already existing file using numpy.save, we should use: ``` f_handle = file(filename, 'a') numpy.save(f_handle, arr) f_handle.close() ``` I have checked that it works in python 2.7 and numpy 1.10.4 I have adapted the code from [here](https://mail.scipy.org/pipermail/numpy-discussion/2007-Nov...
30,376,598
I have built a simple GUI that takes in unorganized HTML code and organizes it...now that I have it working finally I need to learn how to distribute it. I managed to create my .jar file but when I try to run it I get "Error: could not find or failed to load main class HTMLFormatter.class" Here's what I did: First, I...
2015/05/21
[ "https://Stackoverflow.com/questions/30376598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4871354/" ]
The build-in `.npy` file format is perfectly fine for working with small datasets, without relying on external modules other then `numpy`. However, when you start having large amounts of data, the use of a file format, such as HDF5, designed to handle such datasets, is to be preferred [[1]](https://stackoverflow.com/a...
This is an expansion on Mohit Pandey's answer showing a full save / load example. It was tested using Python 3.6 and Numpy 1.11.3. ``` from pathlib import Path import numpy as np import os p = Path('temp.npy') with p.open('ab') as f: np.save(f, np.zeros(2)) np.save(f, np.ones(2)) with p.open('rb') as f: ...
30,376,598
I have built a simple GUI that takes in unorganized HTML code and organizes it...now that I have it working finally I need to learn how to distribute it. I managed to create my .jar file but when I try to run it I get "Error: could not find or failed to load main class HTMLFormatter.class" Here's what I did: First, I...
2015/05/21
[ "https://Stackoverflow.com/questions/30376598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4871354/" ]
This is an expansion on Mohit Pandey's answer showing a full save / load example. It was tested using Python 3.6 and Numpy 1.11.3. ``` from pathlib import Path import numpy as np import os p = Path('temp.npy') with p.open('ab') as f: np.save(f, np.zeros(2)) np.save(f, np.ones(2)) with p.open('rb') as f: ...
`.npy` files contain header which has shape and dtype of the array in it. If you know what your resulting array looks like, you can write header yourself and then data in chunks. E.g., here is the code for concatenating 2d matrices: ``` import numpy as np import numpy.lib.format as fmt def get_header(fnames): dty...
30,376,598
I have built a simple GUI that takes in unorganized HTML code and organizes it...now that I have it working finally I need to learn how to distribute it. I managed to create my .jar file but when I try to run it I get "Error: could not find or failed to load main class HTMLFormatter.class" Here's what I did: First, I...
2015/05/21
[ "https://Stackoverflow.com/questions/30376598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4871354/" ]
I made a library to create Numpy `.npy` files that are larger than the main memory of the machine by appending on the zero axis. The file can then be read with `mmap_mode="r"`. <https://pypi.org/project/npy-append-array> Installation ============ `conda install -c conda-forge npy-append-array` or `pip install npy-...
you can try something like reading the file then add new data ``` import numpy as np import os.path x = np.arange(10) #[0 1 2 3 4 5 6 7 8 9] y = np.load("save.npy") if os.path.isfile("save.npy") else [] #get data if exist np.save("save.npy",np.append(y,x)) #save the new ``` after 2 operation: ``` print(np.load("...
626,230
Here's an image of my motherboard (from a dell optiplex 740): ![enter image description here](https://i.stack.imgur.com/XcCyy.jpg) ![http://img818.imageshack.us/img818/593/2cak.jpg](https://i.stack.imgur.com/GOspw.jpg) Will any of these two intel centrino cards fit in here? * INTEL CENTRINO ADVANCED-N 6235 (=Mini PC...
2013/07/31
[ "https://superuser.com/questions/626230", "https://superuser.com", "https://superuser.com/users/242189/" ]
Chromecast acts as an access point when first turned on. For the initial setup, you install an app on your Android, Windows or mac device, that will find it and connect to the chromecast's AP directly. Then the chromecast scans for nearby access points, allowing you to pick one and enter in its password. Once this ...
You can do this from the chromecast app on an android phone (download from the play store). I haven't figured out any way from PC except factory reset (painful - don't do it).
626,230
Here's an image of my motherboard (from a dell optiplex 740): ![enter image description here](https://i.stack.imgur.com/XcCyy.jpg) ![http://img818.imageshack.us/img818/593/2cak.jpg](https://i.stack.imgur.com/GOspw.jpg) Will any of these two intel centrino cards fit in here? * INTEL CENTRINO ADVANCED-N 6235 (=Mini PC...
2013/07/31
[ "https://superuser.com/questions/626230", "https://superuser.com", "https://superuser.com/users/242189/" ]
Chromecast acts as an access point when first turned on. For the initial setup, you install an app on your Android, Windows or mac device, that will find it and connect to the chromecast's AP directly. Then the chromecast scans for nearby access points, allowing you to pick one and enter in its password. Once this ...
IF you are using Dual bank router like Linksys E3000 make sure your router is configured to listen on both 20Mhz or 40Mhz . On your Linksys router configuration page click on the wireless tab -> basic configuration -> select manual. Then on the channel with select Auto(20Mhz or 40Mhz)
626,230
Here's an image of my motherboard (from a dell optiplex 740): ![enter image description here](https://i.stack.imgur.com/XcCyy.jpg) ![http://img818.imageshack.us/img818/593/2cak.jpg](https://i.stack.imgur.com/GOspw.jpg) Will any of these two intel centrino cards fit in here? * INTEL CENTRINO ADVANCED-N 6235 (=Mini PC...
2013/07/31
[ "https://superuser.com/questions/626230", "https://superuser.com", "https://superuser.com/users/242189/" ]
Chromecast acts as an access point when first turned on. For the initial setup, you install an app on your Android, Windows or mac device, that will find it and connect to the chromecast's AP directly. Then the chromecast scans for nearby access points, allowing you to pick one and enter in its password. Once this ...
Heres how it works: 1. Chromecast fires up, puts out a Wi-Fi signal 2. You connect to this unsecured open Wi-Fi with a smartphone or tablet. You cannot do this with a wired desktop PC. 3. You tell Chromecast the logon credentials of your home broadband Wi-Fi. 4. You and chromecast log of and log back onto the Home Wi-...
626,230
Here's an image of my motherboard (from a dell optiplex 740): ![enter image description here](https://i.stack.imgur.com/XcCyy.jpg) ![http://img818.imageshack.us/img818/593/2cak.jpg](https://i.stack.imgur.com/GOspw.jpg) Will any of these two intel centrino cards fit in here? * INTEL CENTRINO ADVANCED-N 6235 (=Mini PC...
2013/07/31
[ "https://superuser.com/questions/626230", "https://superuser.com", "https://superuser.com/users/242189/" ]
Heres how it works: 1. Chromecast fires up, puts out a Wi-Fi signal 2. You connect to this unsecured open Wi-Fi with a smartphone or tablet. You cannot do this with a wired desktop PC. 3. You tell Chromecast the logon credentials of your home broadband Wi-Fi. 4. You and chromecast log of and log back onto the Home Wi-...
You can do this from the chromecast app on an android phone (download from the play store). I haven't figured out any way from PC except factory reset (painful - don't do it).
626,230
Here's an image of my motherboard (from a dell optiplex 740): ![enter image description here](https://i.stack.imgur.com/XcCyy.jpg) ![http://img818.imageshack.us/img818/593/2cak.jpg](https://i.stack.imgur.com/GOspw.jpg) Will any of these two intel centrino cards fit in here? * INTEL CENTRINO ADVANCED-N 6235 (=Mini PC...
2013/07/31
[ "https://superuser.com/questions/626230", "https://superuser.com", "https://superuser.com/users/242189/" ]
Heres how it works: 1. Chromecast fires up, puts out a Wi-Fi signal 2. You connect to this unsecured open Wi-Fi with a smartphone or tablet. You cannot do this with a wired desktop PC. 3. You tell Chromecast the logon credentials of your home broadband Wi-Fi. 4. You and chromecast log of and log back onto the Home Wi-...
IF you are using Dual bank router like Linksys E3000 make sure your router is configured to listen on both 20Mhz or 40Mhz . On your Linksys router configuration page click on the wireless tab -> basic configuration -> select manual. Then on the channel with select Auto(20Mhz or 40Mhz)
41,534,867
I use Laravel5 and i cant understand why **post**Process or **get**Process not works? Example:: html page: ``` {{ Form::open(array('url' => 'portfolio/process')) }} {{ Form::submit() }} {{ Form::close() }} ``` route: ``` Route::resource('portfolio','PortfolioController'); ``` controller: ``` public func...
2017/01/08
[ "https://Stackoverflow.com/questions/41534867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4341644/" ]
It doesn't work because [`Route::resource`](https://laravel.com/docs/5.3/controllers#resource-controllers) doesn't build these routes and you need to explicitly define them: ``` Route::post('portfolio/process', 'PortfolioController@postProcess'); ```
I think you need to check your route list: Run this command `php artisan route:list` in terminal and check your route. Hope this work for you!
41,073,612
Im trying to sort this dictionary from highest number to lowest number. However I tried to sort the dictionary, but every time the error of : TypeError: string indices must be integers keeps coming up. This is what I coded ``` aurl_params = {} dayum = requests.get(starturl, params = aurl_params) liste = dayum.json()...
2016/12/10
[ "https://Stackoverflow.com/questions/41073612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7260406/" ]
You can add this to your web.config ``` <configuration> <runtime> <dependentAssembly> <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" /> <codeBase version="6.0.0.0" href="bin/EntityFramework-6.1.3/EntityFramework.dll" /> </dependentAssembly> <depen...
You can add this to web.config ``` <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" /> <bindingRedirect oldVer...
3,523,249
I have an e-commerce package called Prestashop. They allow you to sell virtual products, downloadable items, such as software, e-books, etc. They have a problem in their software where they name the physical filename of the downloadable product as a 40-char hash with no extension. Then when a customer goes to download...
2010/08/19
[ "https://Stackoverflow.com/questions/3523249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/338403/" ]
The getID3 library can recognise PDFs and a bunch of other file types. Check it out: <http://getid3.sourceforge.net/>
Since you have access to the code, you can change the method of saving a file where it is converted into the hash and add some blocks of code: 1) Before the file is saved, save the extension yourself. 2) After the hash as been generated, append the extension to the file and save that or record it somewhere (dataf...
25,513,788
I'm having a problem where IntelliJ 13.1.4, when running a unit test, can't find a `ServiceLoader` file in the `src/test/resources` directory of my module. Please note before answering that I've done all of the following: 1. The module is a Gradle project, and if I run `gradle test` the unit test runs fine. 2. I've r...
2014/08/26
[ "https://Stackoverflow.com/questions/25513788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094403/" ]
For me, `Build -> Recompile` created `out` folder described in Project Structure. then it could find my classes. [![enter image description here](https://i.stack.imgur.com/xXbwX.png)](https://i.stack.imgur.com/xXbwX.png)
I ran into the same issue, where Junit was failing(FileNotFound) because I had space in my root project folder. eg: my project/project1/.... * I removed the space from the root folder, my\_project/project1/ all test passed properly.
25,513,788
I'm having a problem where IntelliJ 13.1.4, when running a unit test, can't find a `ServiceLoader` file in the `src/test/resources` directory of my module. Please note before answering that I've done all of the following: 1. The module is a Gradle project, and if I run `gradle test` the unit test runs fine. 2. I've r...
2014/08/26
[ "https://Stackoverflow.com/questions/25513788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094403/" ]
I managed to get it working better by creating a `test-resources` directory parallel to the `test` directory (!). Still seeing intermittent problems with this, though. Those times, it's possible to open the IntelliJ project settings and define the test resources as *source* instead (the Gradle project will remain unc...
When there is a multi-module project, IntelliJ tends to set the top module as the working directory. If this this the case, one can try changing it to the sub-module directory.
25,513,788
I'm having a problem where IntelliJ 13.1.4, when running a unit test, can't find a `ServiceLoader` file in the `src/test/resources` directory of my module. Please note before answering that I've done all of the following: 1. The module is a Gradle project, and if I run `gradle test` the unit test runs fine. 2. I've r...
2014/08/26
[ "https://Stackoverflow.com/questions/25513788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094403/" ]
When I was running into the same issue, it worked for me to once *unmark* the resources directory as resources root and then mark it again as resources root: 1. Right click on resources folder > Mark directory as ... > Unmark as Resources Root 2. Right click on resources folder > Mark directory as ... > Test Resources...
In my case, I simply ran the tests through maven command line, i.e. a basic `mvn clean install`. After that it worked in IDEA.
25,513,788
I'm having a problem where IntelliJ 13.1.4, when running a unit test, can't find a `ServiceLoader` file in the `src/test/resources` directory of my module. Please note before answering that I've done all of the following: 1. The module is a Gradle project, and if I run `gradle test` the unit test runs fine. 2. I've r...
2014/08/26
[ "https://Stackoverflow.com/questions/25513788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094403/" ]
I managed to get it working better by creating a `test-resources` directory parallel to the `test` directory (!). Still seeing intermittent problems with this, though. Those times, it's possible to open the IntelliJ project settings and define the test resources as *source* instead (the Gradle project will remain unc...
I recently encountered this where the junit test could not locate a resource in the `src/test/resources` directory. I had a stray `<packaging>pom</packaging>` in the `pom.xml` file and taking it out solved it in my case.
25,513,788
I'm having a problem where IntelliJ 13.1.4, when running a unit test, can't find a `ServiceLoader` file in the `src/test/resources` directory of my module. Please note before answering that I've done all of the following: 1. The module is a Gradle project, and if I run `gradle test` the unit test runs fine. 2. I've r...
2014/08/26
[ "https://Stackoverflow.com/questions/25513788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094403/" ]
I face a similar issue with IntelliJ 14. Despite having the necessary files in my resources folder and ensuring that the folder is specified as a resource in the module settings, IntelliJ intermittently fails to load my files onto the classpath. One workaround is to add the required folder as a dependency for the modu...
For me, `Build -> Recompile` created `out` folder described in Project Structure. then it could find my classes. [![enter image description here](https://i.stack.imgur.com/xXbwX.png)](https://i.stack.imgur.com/xXbwX.png)
25,513,788
I'm having a problem where IntelliJ 13.1.4, when running a unit test, can't find a `ServiceLoader` file in the `src/test/resources` directory of my module. Please note before answering that I've done all of the following: 1. The module is a Gradle project, and if I run `gradle test` the unit test runs fine. 2. I've r...
2014/08/26
[ "https://Stackoverflow.com/questions/25513788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094403/" ]
If your project is multi maven and other answers did not work, try this one. Change the working directory in intellij. Right Click, go to edit configuration, select the required maven project directory you want to run. ![enter image description here](https://i.stack.imgur.com/f3mtY.png)
I ran into the same issue, where Junit was failing(FileNotFound) because I had space in my root project folder. eg: my project/project1/.... * I removed the space from the root folder, my\_project/project1/ all test passed properly.
25,513,788
I'm having a problem where IntelliJ 13.1.4, when running a unit test, can't find a `ServiceLoader` file in the `src/test/resources` directory of my module. Please note before answering that I've done all of the following: 1. The module is a Gradle project, and if I run `gradle test` the unit test runs fine. 2. I've r...
2014/08/26
[ "https://Stackoverflow.com/questions/25513788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094403/" ]
When I was running into the same issue, it worked for me to once *unmark* the resources directory as resources root and then mark it again as resources root: 1. Right click on resources folder > Mark directory as ... > Unmark as Resources Root 2. Right click on resources folder > Mark directory as ... > Test Resources...
I ran into the same issue, where Junit was failing(FileNotFound) because I had space in my root project folder. eg: my project/project1/.... * I removed the space from the root folder, my\_project/project1/ all test passed properly.
25,513,788
I'm having a problem where IntelliJ 13.1.4, when running a unit test, can't find a `ServiceLoader` file in the `src/test/resources` directory of my module. Please note before answering that I've done all of the following: 1. The module is a Gradle project, and if I run `gradle test` the unit test runs fine. 2. I've r...
2014/08/26
[ "https://Stackoverflow.com/questions/25513788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094403/" ]
In my case, I simply ran the tests through maven command line, i.e. a basic `mvn clean install`. After that it worked in IDEA.
If your project is multi maven and other answers did not work, try this one. Change the working directory in intellij. Right Click, go to edit configuration, select the required maven project directory you want to run. ![enter image description here](https://i.stack.imgur.com/f3mtY.png)
25,513,788
I'm having a problem where IntelliJ 13.1.4, when running a unit test, can't find a `ServiceLoader` file in the `src/test/resources` directory of my module. Please note before answering that I've done all of the following: 1. The module is a Gradle project, and if I run `gradle test` the unit test runs fine. 2. I've r...
2014/08/26
[ "https://Stackoverflow.com/questions/25513788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094403/" ]
I face a similar issue with IntelliJ 14. Despite having the necessary files in my resources folder and ensuring that the folder is specified as a resource in the module settings, IntelliJ intermittently fails to load my files onto the classpath. One workaround is to add the required folder as a dependency for the modu...
I recently encountered this where the junit test could not locate a resource in the `src/test/resources` directory. I had a stray `<packaging>pom</packaging>` in the `pom.xml` file and taking it out solved it in my case.
25,513,788
I'm having a problem where IntelliJ 13.1.4, when running a unit test, can't find a `ServiceLoader` file in the `src/test/resources` directory of my module. Please note before answering that I've done all of the following: 1. The module is a Gradle project, and if I run `gradle test` the unit test runs fine. 2. I've r...
2014/08/26
[ "https://Stackoverflow.com/questions/25513788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094403/" ]
I recently encountered this where the junit test could not locate a resource in the `src/test/resources` directory. I had a stray `<packaging>pom</packaging>` in the `pom.xml` file and taking it out solved it in my case.
I ran into the same issue, where Junit was failing(FileNotFound) because I had space in my root project folder. eg: my project/project1/.... * I removed the space from the root folder, my\_project/project1/ all test passed properly.
2,132,825
In C if we include #stdio.h we get some functions like printf, scanf. In the same way for Objective C what we should do to include NSLog,NSArray,... and where the definitions of these NSLog, NSArray are stored ? Please clarify my confusion.
2010/01/25
[ "https://Stackoverflow.com/questions/2132825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/176436/" ]
Adding to what jib wrote: to use those functions, one puts a line ``` #import <Foundation/Foundation.h> ``` at the top of the source code. This corresponds to `#include <stdio.h>` in the standard C. In OS X, ``` #import <FirstPart/SecondPart.h> ``` reads the header file at `FirstPart.framework` somewhere in the...
NSLog and NSArray are both defined in Foundation.framework. In XCode cmd-click on a symbol to jump to a definition. You can add the enviroment variable DYLD\_PRINT\_LIBRARIES to your app to log Library loads on app launch.
2,132,825
In C if we include #stdio.h we get some functions like printf, scanf. In the same way for Objective C what we should do to include NSLog,NSArray,... and where the definitions of these NSLog, NSArray are stored ? Please clarify my confusion.
2010/01/25
[ "https://Stackoverflow.com/questions/2132825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/176436/" ]
NSLog and NSArray are both defined in Foundation.framework. In XCode cmd-click on a symbol to jump to a definition. You can add the enviroment variable DYLD\_PRINT\_LIBRARIES to your app to log Library loads on app launch.
NSLog, NSArray and other basic classes are included in Framework.h file. To import all these classes in your program simply add `#import Framework\Framework.h` and leave rest for the compiler.
2,132,825
In C if we include #stdio.h we get some functions like printf, scanf. In the same way for Objective C what we should do to include NSLog,NSArray,... and where the definitions of these NSLog, NSArray are stored ? Please clarify my confusion.
2010/01/25
[ "https://Stackoverflow.com/questions/2132825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/176436/" ]
Adding to what jib wrote: to use those functions, one puts a line ``` #import <Foundation/Foundation.h> ``` at the top of the source code. This corresponds to `#include <stdio.h>` in the standard C. In OS X, ``` #import <FirstPart/SecondPart.h> ``` reads the header file at `FirstPart.framework` somewhere in the...
NSLog, NSArray and other basic classes are included in Framework.h file. To import all these classes in your program simply add `#import Framework\Framework.h` and leave rest for the compiler.
68,808,114
i tried a lot of suggested fixes that has been posted here before but i dont really know what else i can do. [![Here is project structure](https://i.stack.imgur.com/bo9ZV.png)](https://i.stack.imgur.com/bo9ZV.png) In scrapers i have 3 function. One main and two helpers. I import to index.js in routes. ``` const { sc...
2021/08/16
[ "https://Stackoverflow.com/questions/68808114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7534743/" ]
You get that error because, at the moment of declaring `scrapeChannel`, `scrape` is not defined. So, when you call `scrapeChannel`, `scrape` is still not defined inside the function closure. You can read more about javascript closures here <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures> You shouldn'...
Adding `this` to `scrape` and `iterateProducts` fixed the problem. But still if someone can explain why `this` is needed ``` await page.evaluate(this.scrape) let products = await this.iterateProducts(el[1], el[0]) ```
11,376,207
I have got lots of div.articles and in that articles; i've got list of tags. I am trying hide article divs which don't got href = '#myFilter'. I have no problem with reaching to href, my problem is reaching it's parent() without creating jQuery conflict . [**Here is jsFiddle example to inspect.**](http://jsfiddle.net...
2012/07/07
[ "https://Stackoverflow.com/questions/11376207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1428241/" ]
**UPDATE**: New demo: <http://jsfiddle.net/9GErB/> This eliminates the flash you were seeing before and also demonstrates how you can change the selector to use a variable. Relies on the [jQuery filter method](http://api.jquery.com/filter/), which is really what your question requires. ``` var news = '#/news'; var nat...
Try this, **[Live Demo](http://jsfiddle.net/nUsWT/29/)** ``` $('.article').each(function() { $(this).find('a').each(function(){ if ( $(this).attr('href') === news ) { $(this).closest('.article').show(); return false; }else $(this).closest('.article').hide(); }); });​ `...
11,376,207
I have got lots of div.articles and in that articles; i've got list of tags. I am trying hide article divs which don't got href = '#myFilter'. I have no problem with reaching to href, my problem is reaching it's parent() without creating jQuery conflict . [**Here is jsFiddle example to inspect.**](http://jsfiddle.net...
2012/07/07
[ "https://Stackoverflow.com/questions/11376207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1428241/" ]
For each of the articles use a closure to track if you should hide the current item. This won't have the flicker of nbrooks' answer. As this fiddle shows: <http://jsfiddle.net/878zQ/14/> ``` var news = '#/news'; var nature = '#/nature'; var sport = '#/sport'; var hobbies = '#/hobbies'; var economy = '#/economy'; var ...
Try this, **[Live Demo](http://jsfiddle.net/nUsWT/29/)** ``` $('.article').each(function() { $(this).find('a').each(function(){ if ( $(this).attr('href') === news ) { $(this).closest('.article').show(); return false; }else $(this).closest('.article').hide(); }); });​ `...
11,376,207
I have got lots of div.articles and in that articles; i've got list of tags. I am trying hide article divs which don't got href = '#myFilter'. I have no problem with reaching to href, my problem is reaching it's parent() without creating jQuery conflict . [**Here is jsFiddle example to inspect.**](http://jsfiddle.net...
2012/07/07
[ "https://Stackoverflow.com/questions/11376207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1428241/" ]
For each of the articles use a closure to track if you should hide the current item. This won't have the flicker of nbrooks' answer. As this fiddle shows: <http://jsfiddle.net/878zQ/14/> ``` var news = '#/news'; var nature = '#/nature'; var sport = '#/sport'; var hobbies = '#/hobbies'; var economy = '#/economy'; var ...
**UPDATE**: New demo: <http://jsfiddle.net/9GErB/> This eliminates the flash you were seeing before and also demonstrates how you can change the selector to use a variable. Relies on the [jQuery filter method](http://api.jquery.com/filter/), which is really what your question requires. ``` var news = '#/news'; var nat...
42,397,005
``` <p><span>*</span>Here lies a note.</p> ``` Using CSS, how can I hide (that is, `display:none`) the text “Here lies a note.” and show just the “\*”?
2017/02/22
[ "https://Stackoverflow.com/questions/42397005", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215920/" ]
Since you can't select text nodes with CSS, one option is to set the `font-size` of the parent element to `0`, which will effectively hide all the text. Then you can reset the text for the desired element. ```css .target { font-size: 0; } .target > :first-child { font-size: 16px; } ``` ```html <p class="targ...
You can use `visibility` to hide parent and show child element. ```css p { visibility: hidden; } p > :first-child { visibility: visible; } ``` ```html <p><span>*</span>Here lies a note.</p> ```
9,044,789
I have hacked my NAS-01g into a debian server and use it to regularly download stock quote and earthquake information from the web. I was on a trip last week and I turned off my sever at home, but when I come back, I can no long gain access to the server. Considering re-configuring the server as very time-consuming, I ...
2012/01/28
[ "https://Stackoverflow.com/questions/9044789", "https://Stackoverflow.com", "https://Stackoverflow.com/users/373908/" ]
Belongs on ServerFault, but I think Linode is a good candidate. They have monthly plans that don't cost a fortune and you can get a debian install on it. (we just installed one for work and selected Debian, so I'm 100% sure).
Pricing scheme for Amazon is more complicated, but more transparent. They separate in Machine Hours (EC2 Hours), Data Transfer In/Out and storage. You can have too Elastic IPs (static IPs) and Load Balancers (LBs). And you can choose if you want reserved instances (1yr/3yr term) or on-demand instances(more expensive bu...
12,645,161
I need to write a small Java program that deals with calculations involving money. Therefore it needs to have accuracy. (Eg: No `float`/`double` variables, only `long`). Unfortunately, the original value I need to use is imported through a method which can only read variables as "double". Now, I tried casting it to a...
2012/09/28
[ "https://Stackoverflow.com/questions/12645161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1876047/" ]
**Update:** This post raised an additional question which I don't think was ever answered-- why use `int`, or better yet, `long` or `BigDecimal` for currency calculations. This is answered here: [Why not to use double or float to represent currency (or where any exact calculations are needed)?](https://stackoverflow....
Why not look at [BigDecimal](http://docs.oracle.com/javase/1.4.2/docs/api/java/math/BigDecimal.html#BigDecimal%28double%29). It works well when I have used it. Be careful using the Double ctor though as Double is not that precise (eg it cannot accurately store 0.1). It may be more useful to use the [String](http://docs...
12,645,161
I need to write a small Java program that deals with calculations involving money. Therefore it needs to have accuracy. (Eg: No `float`/`double` variables, only `long`). Unfortunately, the original value I need to use is imported through a method which can only read variables as "double". Now, I tried casting it to a...
2012/09/28
[ "https://Stackoverflow.com/questions/12645161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1876047/" ]
Forget all the casting business. If you are working with financial calculations, you can directly use BigDecimal to wrap the doubles returned by your so called method and use an appropriate rounding mechanism provided by BigDecimal that suits your needs.
You're casting `x` to a long than trying to assign it to a double. That doesn't make sense. If you want a long, you should use a long. `long longValue = (long) 4.64;`
12,645,161
I need to write a small Java program that deals with calculations involving money. Therefore it needs to have accuracy. (Eg: No `float`/`double` variables, only `long`). Unfortunately, the original value I need to use is imported through a method which can only read variables as "double". Now, I tried casting it to a...
2012/09/28
[ "https://Stackoverflow.com/questions/12645161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1876047/" ]
``` double importedValue = x; double importedValueConverted = (long) x; ``` Note that both of these variables are declared as 'double'. This results in your error (paraphrasing): (the operation you're doing requires a) `long` (but when it tried it found a) `double`. You want: ``` double importedValue = x; long impo...
If you wanna cast double to long you do below. ``` double importedValue = 8.0; long importedValueConverted = (long) 8.0; System.out.println(importedValueConverted/(long)8); ``` OUTPUT: 1 ``` double importedValue = x; double importedValueConverted = (long) x; ``` you were trying to cast a double to lon...
12,645,161
I need to write a small Java program that deals with calculations involving money. Therefore it needs to have accuracy. (Eg: No `float`/`double` variables, only `long`). Unfortunately, the original value I need to use is imported through a method which can only read variables as "double". Now, I tried casting it to a...
2012/09/28
[ "https://Stackoverflow.com/questions/12645161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1876047/" ]
``` double importedValue = x; double importedValueConverted = (long) x; ``` Note that both of these variables are declared as 'double'. This results in your error (paraphrasing): (the operation you're doing requires a) `long` (but when it tried it found a) `double`. You want: ``` double importedValue = x; long impo...
You're casting `x` to a long than trying to assign it to a double. That doesn't make sense. If you want a long, you should use a long. `long longValue = (long) 4.64;`
12,645,161
I need to write a small Java program that deals with calculations involving money. Therefore it needs to have accuracy. (Eg: No `float`/`double` variables, only `long`). Unfortunately, the original value I need to use is imported through a method which can only read variables as "double". Now, I tried casting it to a...
2012/09/28
[ "https://Stackoverflow.com/questions/12645161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1876047/" ]
``` double importedValue = x; double importedValueConverted = (long) x; ``` Note that both of these variables are declared as 'double'. This results in your error (paraphrasing): (the operation you're doing requires a) `long` (but when it tried it found a) `double`. You want: ``` double importedValue = x; long impo...
**Update:** This post raised an additional question which I don't think was ever answered-- why use `int`, or better yet, `long` or `BigDecimal` for currency calculations. This is answered here: [Why not to use double or float to represent currency (or where any exact calculations are needed)?](https://stackoverflow....
12,645,161
I need to write a small Java program that deals with calculations involving money. Therefore it needs to have accuracy. (Eg: No `float`/`double` variables, only `long`). Unfortunately, the original value I need to use is imported through a method which can only read variables as "double". Now, I tried casting it to a...
2012/09/28
[ "https://Stackoverflow.com/questions/12645161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1876047/" ]
Forget all the casting business. If you are working with financial calculations, you can directly use BigDecimal to wrap the doubles returned by your so called method and use an appropriate rounding mechanism provided by BigDecimal that suits your needs.
Why not look at [BigDecimal](http://docs.oracle.com/javase/1.4.2/docs/api/java/math/BigDecimal.html#BigDecimal%28double%29). It works well when I have used it. Be careful using the Double ctor though as Double is not that precise (eg it cannot accurately store 0.1). It may be more useful to use the [String](http://docs...
12,645,161
I need to write a small Java program that deals with calculations involving money. Therefore it needs to have accuracy. (Eg: No `float`/`double` variables, only `long`). Unfortunately, the original value I need to use is imported through a method which can only read variables as "double". Now, I tried casting it to a...
2012/09/28
[ "https://Stackoverflow.com/questions/12645161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1876047/" ]
**Update:** This post raised an additional question which I don't think was ever answered-- why use `int`, or better yet, `long` or `BigDecimal` for currency calculations. This is answered here: [Why not to use double or float to represent currency (or where any exact calculations are needed)?](https://stackoverflow....
You're casting `x` to a long than trying to assign it to a double. That doesn't make sense. If you want a long, you should use a long. `long longValue = (long) 4.64;`
12,645,161
I need to write a small Java program that deals with calculations involving money. Therefore it needs to have accuracy. (Eg: No `float`/`double` variables, only `long`). Unfortunately, the original value I need to use is imported through a method which can only read variables as "double". Now, I tried casting it to a...
2012/09/28
[ "https://Stackoverflow.com/questions/12645161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1876047/" ]
Forget all the casting business. If you are working with financial calculations, you can directly use BigDecimal to wrap the doubles returned by your so called method and use an appropriate rounding mechanism provided by BigDecimal that suits your needs.
If you wanna cast double to long you do below. ``` double importedValue = 8.0; long importedValueConverted = (long) 8.0; System.out.println(importedValueConverted/(long)8); ``` OUTPUT: 1 ``` double importedValue = x; double importedValueConverted = (long) x; ``` you were trying to cast a double to lon...
12,645,161
I need to write a small Java program that deals with calculations involving money. Therefore it needs to have accuracy. (Eg: No `float`/`double` variables, only `long`). Unfortunately, the original value I need to use is imported through a method which can only read variables as "double". Now, I tried casting it to a...
2012/09/28
[ "https://Stackoverflow.com/questions/12645161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1876047/" ]
``` double importedValue = x; double importedValueConverted = (long) x; ``` Note that both of these variables are declared as 'double'. This results in your error (paraphrasing): (the operation you're doing requires a) `long` (but when it tried it found a) `double`. You want: ``` double importedValue = x; long impo...
Why not look at [BigDecimal](http://docs.oracle.com/javase/1.4.2/docs/api/java/math/BigDecimal.html#BigDecimal%28double%29). It works well when I have used it. Be careful using the Double ctor though as Double is not that precise (eg it cannot accurately store 0.1). It may be more useful to use the [String](http://docs...
12,645,161
I need to write a small Java program that deals with calculations involving money. Therefore it needs to have accuracy. (Eg: No `float`/`double` variables, only `long`). Unfortunately, the original value I need to use is imported through a method which can only read variables as "double". Now, I tried casting it to a...
2012/09/28
[ "https://Stackoverflow.com/questions/12645161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1876047/" ]
**Update:** This post raised an additional question which I don't think was ever answered-- why use `int`, or better yet, `long` or `BigDecimal` for currency calculations. This is answered here: [Why not to use double or float to represent currency (or where any exact calculations are needed)?](https://stackoverflow....
If you wanna cast double to long you do below. ``` double importedValue = 8.0; long importedValueConverted = (long) 8.0; System.out.println(importedValueConverted/(long)8); ``` OUTPUT: 1 ``` double importedValue = x; double importedValueConverted = (long) x; ``` you were trying to cast a double to lon...
32,128
Planning on writing a picture sci-fi book about Utopia. The book will not have a plot (story), sequence or any conclusion. It will have approximately 30 illustrations generally depicting a search for Utopia, accompanied by minimal text for each illustration. Similar to a photo book. Has anything similar to this been pu...
2017/12/23
[ "https://writers.stackexchange.com/questions/32128", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/28579/" ]
*The Room* is about a man whose love life runs off the rails and ends in a brutal break-up. This is a topic that a *lot* of people are interested in. *La La Land* is about the same theme. *Shrek* seems like that's how it's going to end leading into the final act. I can't begin to list how many breakup songs have hit th...
What is interesting to the reader completely depends on the reader (the targeted and reached audience). For instance, people at a library will like different kind of books than people commuting by train. The only way to know if people find your book interesting is to let people read your book (or parts of it, and then...
32,128
Planning on writing a picture sci-fi book about Utopia. The book will not have a plot (story), sequence or any conclusion. It will have approximately 30 illustrations generally depicting a search for Utopia, accompanied by minimal text for each illustration. Similar to a photo book. Has anything similar to this been pu...
2017/12/23
[ "https://writers.stackexchange.com/questions/32128", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/28579/" ]
*The Room* is about a man whose love life runs off the rails and ends in a brutal break-up. This is a topic that a *lot* of people are interested in. *La La Land* is about the same theme. *Shrek* seems like that's how it's going to end leading into the final act. I can't begin to list how many breakup songs have hit th...
**You really don't know.** But here's the thing. There are 7.5 billion people on the planet. Let's say that you want to sell 100,000 copies. That means you only need to be interesting to 1/75000 people. Your story interests **you**. Are you so special that you find something interesting that 75000 other people **d...
32,128
Planning on writing a picture sci-fi book about Utopia. The book will not have a plot (story), sequence or any conclusion. It will have approximately 30 illustrations generally depicting a search for Utopia, accompanied by minimal text for each illustration. Similar to a photo book. Has anything similar to this been pu...
2017/12/23
[ "https://writers.stackexchange.com/questions/32128", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/28579/" ]
I upvoted the answers about writing for yourself and noting what you find interesting. Go over and make mental note which areas you tend to skim over or feel confused on. Sometimes it take a few cycles of reading, editing and rereading before realizing a section needs to be cut out or changed. As for the subject or th...
What is interesting to the reader completely depends on the reader (the targeted and reached audience). For instance, people at a library will like different kind of books than people commuting by train. The only way to know if people find your book interesting is to let people read your book (or parts of it, and then...
32,128
Planning on writing a picture sci-fi book about Utopia. The book will not have a plot (story), sequence or any conclusion. It will have approximately 30 illustrations generally depicting a search for Utopia, accompanied by minimal text for each illustration. Similar to a photo book. Has anything similar to this been pu...
2017/12/23
[ "https://writers.stackexchange.com/questions/32128", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/28579/" ]
*The Room* is about a man whose love life runs off the rails and ends in a brutal break-up. This is a topic that a *lot* of people are interested in. *La La Land* is about the same theme. *Shrek* seems like that's how it's going to end leading into the final act. I can't begin to list how many breakup songs have hit th...
The story must interest YOU --------------------------- When I started out, I did exactly that: tried to do stuff specifically for others, and well I did not do so well. The material I came up with was... underwhelming. Then I started reading other people's stuff. I quickly realized that the material that interested *...
32,128
Planning on writing a picture sci-fi book about Utopia. The book will not have a plot (story), sequence or any conclusion. It will have approximately 30 illustrations generally depicting a search for Utopia, accompanied by minimal text for each illustration. Similar to a photo book. Has anything similar to this been pu...
2017/12/23
[ "https://writers.stackexchange.com/questions/32128", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/28579/" ]
*The Room* is about a man whose love life runs off the rails and ends in a brutal break-up. This is a topic that a *lot* of people are interested in. *La La Land* is about the same theme. *Shrek* seems like that's how it's going to end leading into the final act. I can't begin to list how many breakup songs have hit th...
If anything kept me awake at night (and some things have) I'd presume it was likely real trouble. Look for groups or websites online that deal with the topics that interest you. If you can't find any with significant membership, those topics may not be worthy of exploring in book length form. As far as "observations...
32,128
Planning on writing a picture sci-fi book about Utopia. The book will not have a plot (story), sequence or any conclusion. It will have approximately 30 illustrations generally depicting a search for Utopia, accompanied by minimal text for each illustration. Similar to a photo book. Has anything similar to this been pu...
2017/12/23
[ "https://writers.stackexchange.com/questions/32128", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/28579/" ]
Only an outsider can help you. Find someone you can trust to honestly review your work, such as a close friend or relative. Internet critique groups might be helpful. Be very specific that you want them to read looking for flaws, otherwise they'll just look at the good parts and give you the generic "that's good". Par...
The story must interest YOU --------------------------- When I started out, I did exactly that: tried to do stuff specifically for others, and well I did not do so well. The material I came up with was... underwhelming. Then I started reading other people's stuff. I quickly realized that the material that interested *...
32,128
Planning on writing a picture sci-fi book about Utopia. The book will not have a plot (story), sequence or any conclusion. It will have approximately 30 illustrations generally depicting a search for Utopia, accompanied by minimal text for each illustration. Similar to a photo book. Has anything similar to this been pu...
2017/12/23
[ "https://writers.stackexchange.com/questions/32128", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/28579/" ]
*The Room* is about a man whose love life runs off the rails and ends in a brutal break-up. This is a topic that a *lot* of people are interested in. *La La Land* is about the same theme. *Shrek* seems like that's how it's going to end leading into the final act. I can't begin to list how many breakup songs have hit th...
I upvoted the answers about writing for yourself and noting what you find interesting. Go over and make mental note which areas you tend to skim over or feel confused on. Sometimes it take a few cycles of reading, editing and rereading before realizing a section needs to be cut out or changed. As for the subject or th...
32,128
Planning on writing a picture sci-fi book about Utopia. The book will not have a plot (story), sequence or any conclusion. It will have approximately 30 illustrations generally depicting a search for Utopia, accompanied by minimal text for each illustration. Similar to a photo book. Has anything similar to this been pu...
2017/12/23
[ "https://writers.stackexchange.com/questions/32128", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/28579/" ]
**You really don't know.** But here's the thing. There are 7.5 billion people on the planet. Let's say that you want to sell 100,000 copies. That means you only need to be interesting to 1/75000 people. Your story interests **you**. Are you so special that you find something interesting that 75000 other people **d...
What is interesting to the reader completely depends on the reader (the targeted and reached audience). For instance, people at a library will like different kind of books than people commuting by train. The only way to know if people find your book interesting is to let people read your book (or parts of it, and then...
32,128
Planning on writing a picture sci-fi book about Utopia. The book will not have a plot (story), sequence or any conclusion. It will have approximately 30 illustrations generally depicting a search for Utopia, accompanied by minimal text for each illustration. Similar to a photo book. Has anything similar to this been pu...
2017/12/23
[ "https://writers.stackexchange.com/questions/32128", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/28579/" ]
If anything kept me awake at night (and some things have) I'd presume it was likely real trouble. Look for groups or websites online that deal with the topics that interest you. If you can't find any with significant membership, those topics may not be worthy of exploring in book length form. As far as "observations...
What is interesting to the reader completely depends on the reader (the targeted and reached audience). For instance, people at a library will like different kind of books than people commuting by train. The only way to know if people find your book interesting is to let people read your book (or parts of it, and then...
32,128
Planning on writing a picture sci-fi book about Utopia. The book will not have a plot (story), sequence or any conclusion. It will have approximately 30 illustrations generally depicting a search for Utopia, accompanied by minimal text for each illustration. Similar to a photo book. Has anything similar to this been pu...
2017/12/23
[ "https://writers.stackexchange.com/questions/32128", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/28579/" ]
**You really don't know.** But here's the thing. There are 7.5 billion people on the planet. Let's say that you want to sell 100,000 copies. That means you only need to be interesting to 1/75000 people. Your story interests **you**. Are you so special that you find something interesting that 75000 other people **d...
If anything kept me awake at night (and some things have) I'd presume it was likely real trouble. Look for groups or websites online that deal with the topics that interest you. If you can't find any with significant membership, those topics may not be worthy of exploring in book length form. As far as "observations...
46,421,800
I have used 1 to 10 number stored in array as: ``` number = [[NSMutableArray alloc]initWithObjects:@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10", nil]; ``` And used `arc4random` in this array as: ``` randomNumber = arc4random() % number.count; //random selected number NSLog(@"%d",randomNumber); ``` In class...
2017/09/26
[ "https://Stackoverflow.com/questions/46421800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8669034/" ]
Try this: ``` function helloWorld () { return 'helloworld '; } var origHelloWorld = window.helloWorld; window.helloWorld = function() { return origHelloWorld() + ' ' +'helloworld2'; } alert( helloWorld() ); ```
Are you sure, you understand override? **yours sample with the same parma, how to override it?** and javascript has not a method about the override, but you can override in other ways. you can follow [other questions in stackoverflow](https://stackoverflow.com/questions/456177/function-overloading-in-javascript-best-...
46,421,800
I have used 1 to 10 number stored in array as: ``` number = [[NSMutableArray alloc]initWithObjects:@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10", nil]; ``` And used `arc4random` in this array as: ``` randomNumber = arc4random() % number.count; //random selected number NSLog(@"%d",randomNumber); ``` In class...
2017/09/26
[ "https://Stackoverflow.com/questions/46421800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8669034/" ]
Try this: ``` function helloWorld () { return 'helloworld '; } var origHelloWorld = window.helloWorld; window.helloWorld = function() { return origHelloWorld() + ' ' +'helloworld2'; } alert( helloWorld() ); ```
Using closures to avoid polluting the global namespace: ``` function helloWorld () { return 'helloworld '; } helloWorld = (function() { var original = window.helloWorld; return function () { return original() + ' helloworld2'; }})(); alert(helloWorld()); ```
10,804
just a simple question: what does qt in bitcoin-qt stand for?
2013/05/11
[ "https://bitcoin.stackexchange.com/questions/10804", "https://bitcoin.stackexchange.com", "https://bitcoin.stackexchange.com/users/4964/" ]
Qt is a cross-platform application and UI framework for developers using C++. It's is used for UI in Bitcoin-Qt. See <http://qt-project.org/>
According to the Wikipedia article:"The toolkit was called Qt because the letter Q looked appealing in Haavard's Emacs font, and "t" was inspired by Xt, the X toolkit"
720
I don't remember a hint on the movie how Jason Bourne found the home of [Jarda](http://bourne.wikia.com/wiki/Jarda), the only other living Treadstone assassin. Is it mentioned somewhere or are we just supposed to assume that Bourne simply used his amazing resourcefulness to find him?
2011/12/30
[ "https://movies.stackexchange.com/questions/720", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/105/" ]
I didn't notice that this was glossed over the first time I watched it, but I see two possible explanations. 1. At the end of *The Bourne Identity*, Jason Bourne briefly had access to some information about Treadstone when he infiltrates a safehouse. He could have found the information there and kept it. (This is a *p...
I'm starting to think he didn't lose his memory and it was a plot by Treadstone to set him on a path he never lived. Such as his apartment in Paris. He doesn't remember it because he was never there before. It was all a plot to set him up.
720
I don't remember a hint on the movie how Jason Bourne found the home of [Jarda](http://bourne.wikia.com/wiki/Jarda), the only other living Treadstone assassin. Is it mentioned somewhere or are we just supposed to assume that Bourne simply used his amazing resourcefulness to find him?
2011/12/30
[ "https://movies.stackexchange.com/questions/720", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/105/" ]
I didn't notice that this was glossed over the first time I watched it, but I see two possible explanations. 1. At the end of *The Bourne Identity*, Jason Bourne briefly had access to some information about Treadstone when he infiltrates a safehouse. He could have found the information there and kept it. (This is a *p...
There is no explanation. I really cannot see the CIA allowing their Treadstone assets to know each other's addresses. I can see thing giving Bourne's Paris address to Castel and the others when they wanted him dead. But alive? I don't see it. In fact, the movie never hinted that the Treadstone assets worked together. T...
720
I don't remember a hint on the movie how Jason Bourne found the home of [Jarda](http://bourne.wikia.com/wiki/Jarda), the only other living Treadstone assassin. Is it mentioned somewhere or are we just supposed to assume that Bourne simply used his amazing resourcefulness to find him?
2011/12/30
[ "https://movies.stackexchange.com/questions/720", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/105/" ]
I didn't notice that this was glossed over the first time I watched it, but I see two possible explanations. 1. At the end of *The Bourne Identity*, Jason Bourne briefly had access to some information about Treadstone when he infiltrates a safehouse. He could have found the information there and kept it. (This is a *p...
I always thought the Treadstone operative who killed Conklin on Abbott's orders in Identity and the Treadstone agent Bourne tracked down in Supremacy were the same guy. I don't understand why they had two different characters in these roles; it would have tied it all together nicely.
720
I don't remember a hint on the movie how Jason Bourne found the home of [Jarda](http://bourne.wikia.com/wiki/Jarda), the only other living Treadstone assassin. Is it mentioned somewhere or are we just supposed to assume that Bourne simply used his amazing resourcefulness to find him?
2011/12/30
[ "https://movies.stackexchange.com/questions/720", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/105/" ]
I didn't notice that this was glossed over the first time I watched it, but I see two possible explanations. 1. At the end of *The Bourne Identity*, Jason Bourne briefly had access to some information about Treadstone when he infiltrates a safehouse. He could have found the information there and kept it. (This is a *p...
It took some digging. When they meet each other at the house in Munich Jarda says "word in the ether was that you lost your memory." And Bourne replies "you still should have moved." This implies Bourne has at least some fragmented memories of prior knowledge of Jarda, or maybe that the house is covertly owned by the C...
720
I don't remember a hint on the movie how Jason Bourne found the home of [Jarda](http://bourne.wikia.com/wiki/Jarda), the only other living Treadstone assassin. Is it mentioned somewhere or are we just supposed to assume that Bourne simply used his amazing resourcefulness to find him?
2011/12/30
[ "https://movies.stackexchange.com/questions/720", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/105/" ]
There is no explanation. I really cannot see the CIA allowing their Treadstone assets to know each other's addresses. I can see thing giving Bourne's Paris address to Castel and the others when they wanted him dead. But alive? I don't see it. In fact, the movie never hinted that the Treadstone assets worked together. T...
I'm starting to think he didn't lose his memory and it was a plot by Treadstone to set him on a path he never lived. Such as his apartment in Paris. He doesn't remember it because he was never there before. It was all a plot to set him up.
720
I don't remember a hint on the movie how Jason Bourne found the home of [Jarda](http://bourne.wikia.com/wiki/Jarda), the only other living Treadstone assassin. Is it mentioned somewhere or are we just supposed to assume that Bourne simply used his amazing resourcefulness to find him?
2011/12/30
[ "https://movies.stackexchange.com/questions/720", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/105/" ]
It took some digging. When they meet each other at the house in Munich Jarda says "word in the ether was that you lost your memory." And Bourne replies "you still should have moved." This implies Bourne has at least some fragmented memories of prior knowledge of Jarda, or maybe that the house is covertly owned by the C...
I'm starting to think he didn't lose his memory and it was a plot by Treadstone to set him on a path he never lived. Such as his apartment in Paris. He doesn't remember it because he was never there before. It was all a plot to set him up.
720
I don't remember a hint on the movie how Jason Bourne found the home of [Jarda](http://bourne.wikia.com/wiki/Jarda), the only other living Treadstone assassin. Is it mentioned somewhere or are we just supposed to assume that Bourne simply used his amazing resourcefulness to find him?
2011/12/30
[ "https://movies.stackexchange.com/questions/720", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/105/" ]
There is no explanation. I really cannot see the CIA allowing their Treadstone assets to know each other's addresses. I can see thing giving Bourne's Paris address to Castel and the others when they wanted him dead. But alive? I don't see it. In fact, the movie never hinted that the Treadstone assets worked together. T...
I always thought the Treadstone operative who killed Conklin on Abbott's orders in Identity and the Treadstone agent Bourne tracked down in Supremacy were the same guy. I don't understand why they had two different characters in these roles; it would have tied it all together nicely.
720
I don't remember a hint on the movie how Jason Bourne found the home of [Jarda](http://bourne.wikia.com/wiki/Jarda), the only other living Treadstone assassin. Is it mentioned somewhere or are we just supposed to assume that Bourne simply used his amazing resourcefulness to find him?
2011/12/30
[ "https://movies.stackexchange.com/questions/720", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/105/" ]
There is no explanation. I really cannot see the CIA allowing their Treadstone assets to know each other's addresses. I can see thing giving Bourne's Paris address to Castel and the others when they wanted him dead. But alive? I don't see it. In fact, the movie never hinted that the Treadstone assets worked together. T...
It took some digging. When they meet each other at the house in Munich Jarda says "word in the ether was that you lost your memory." And Bourne replies "you still should have moved." This implies Bourne has at least some fragmented memories of prior knowledge of Jarda, or maybe that the house is covertly owned by the C...
720
I don't remember a hint on the movie how Jason Bourne found the home of [Jarda](http://bourne.wikia.com/wiki/Jarda), the only other living Treadstone assassin. Is it mentioned somewhere or are we just supposed to assume that Bourne simply used his amazing resourcefulness to find him?
2011/12/30
[ "https://movies.stackexchange.com/questions/720", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/105/" ]
It took some digging. When they meet each other at the house in Munich Jarda says "word in the ether was that you lost your memory." And Bourne replies "you still should have moved." This implies Bourne has at least some fragmented memories of prior knowledge of Jarda, or maybe that the house is covertly owned by the C...
I always thought the Treadstone operative who killed Conklin on Abbott's orders in Identity and the Treadstone agent Bourne tracked down in Supremacy were the same guy. I don't understand why they had two different characters in these roles; it would have tied it all together nicely.
817,232
As a programmer, I often look at some features of the language I'm currently using and think to myself "This is pretty hard to do for a programmer, and could be taken care of automatically by the machine". One example of such a feature is memory management, which has been automatic for a while in a variety of language...
2009/05/03
[ "https://Stackoverflow.com/questions/817232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80779/" ]
Concurrency. That was my main idea when asking this question. This is going to get more and more important with time, since current CPUs already have up to 8 logical cores (4 cores + hyperthreading), and 12 logical cores will appear in a few months. In the future, we are going to have a hell of a lot of cores at our di...
From a dynamic languages perspective, I'd like to see better tool support. Steve Yegge has a [great post](http://steve-yegge.blogspot.com/2008/05/dynamic-languages-strike-back.html) on this. For instance, there are lots of cases where a tool could look inside various code paths and determine if the methods or functions...
817,232
As a programmer, I often look at some features of the language I'm currently using and think to myself "This is pretty hard to do for a programmer, and could be taken care of automatically by the machine". One example of such a feature is memory management, which has been automatic for a while in a variety of language...
2009/05/03
[ "https://Stackoverflow.com/questions/817232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80779/" ]
``` exec("Build a system to keep the customer happy, based on requirements.txt"); ```
Everything that LINQ does. C# has spoiled me and I now find it hard to do anything with collections in any other language. In Python I use list comprehensions a lot, but they are not quite as powerful as LINQ. I haven't found any other language that makes working with collections as easy as in C#.
817,232
As a programmer, I often look at some features of the language I'm currently using and think to myself "This is pretty hard to do for a programmer, and could be taken care of automatically by the machine". One example of such a feature is memory management, which has been automatic for a while in a variety of language...
2009/05/03
[ "https://Stackoverflow.com/questions/817232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80779/" ]
Persistence, it seems to me we write far too much code to deal with persistence when this really should be a configuration problem.
From a dynamic languages perspective, I'd like to see better tool support. Steve Yegge has a [great post](http://steve-yegge.blogspot.com/2008/05/dynamic-languages-strike-back.html) on this. For instance, there are lots of cases where a tool could look inside various code paths and determine if the methods or functions...
817,232
As a programmer, I often look at some features of the language I'm currently using and think to myself "This is pretty hard to do for a programmer, and could be taken care of automatically by the machine". One example of such a feature is memory management, which has been automatic for a while in a variety of language...
2009/05/03
[ "https://Stackoverflow.com/questions/817232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80779/" ]
Whatever the language can do for me automatically, I will want a way of doing for myself.
Concurrency. That was my main idea when asking this question. This is going to get more and more important with time, since current CPUs already have up to 8 logical cores (4 cores + hyperthreading), and 12 logical cores will appear in a few months. In the future, we are going to have a hell of a lot of cores at our di...
817,232
As a programmer, I often look at some features of the language I'm currently using and think to myself "This is pretty hard to do for a programmer, and could be taken care of automatically by the machine". One example of such a feature is memory management, which has been automatic for a while in a variety of language...
2009/05/03
[ "https://Stackoverflow.com/questions/817232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80779/" ]
Whatever the language can do for me automatically, I will want a way of doing for myself.
In C++, type inference for variable declarations, so that I don't need to write ``` for (vector<some_longwinded_type>::const_iterator i = v.begin(); i != v.end(); ++i) { ... } ``` Luckily this is coming in C++1x in the form of `auto`: ``` for (auto i = v.begin(); i != v.end(); ++i) { ... } ```
817,232
As a programmer, I often look at some features of the language I'm currently using and think to myself "This is pretty hard to do for a programmer, and could be taken care of automatically by the machine". One example of such a feature is memory management, which has been automatic for a while in a variety of language...
2009/05/03
[ "https://Stackoverflow.com/questions/817232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80779/" ]
Coffee. I mean the language is call Java - so it should be able to make my coffee! I hate getting up from programming, going to the coffee pot, and finding out someone from marketing has taken the last cup and not made another pot.
In C++, enum-to-string. In Ada, the language defines the 'image attribute of an enumerated type as a function that returns a string corresponding to the textual representation of an enumeration value. C++ provides no such clean facility. It takes several lines of very arcane preprocessor macro black magic to get a ro...
817,232
As a programmer, I often look at some features of the language I'm currently using and think to myself "This is pretty hard to do for a programmer, and could be taken care of automatically by the machine". One example of such a feature is memory management, which has been automatic for a while in a variety of language...
2009/05/03
[ "https://Stackoverflow.com/questions/817232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80779/" ]
In C++, type inference for variable declarations, so that I don't need to write ``` for (vector<some_longwinded_type>::const_iterator i = v.begin(); i != v.end(); ++i) { ... } ``` Luckily this is coming in C++1x in the form of `auto`: ``` for (auto i = v.begin(); i != v.end(); ++i) { ... } ```
Easy: initialize variables in C/C++ just like C# does. It would have saved me multiple sessions of debugging in other people's code. Of course there would be a keyword when you specifically do not want to init a var. ``` noinit float myVal; // undefined float my2ndVal; // 0.0f ```
817,232
As a programmer, I often look at some features of the language I'm currently using and think to myself "This is pretty hard to do for a programmer, and could be taken care of automatically by the machine". One example of such a feature is memory management, which has been automatic for a while in a variety of language...
2009/05/03
[ "https://Stackoverflow.com/questions/817232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80779/" ]
In Java, create beans less verbosely. For example: ``` bean Student { String name; int id; type1 property1; type2 property2; } ``` and this would create a bean private fields, default accessors, toString, hashCode, equals, etc.
Coffee. I mean the language is call Java - so it should be able to make my coffee! I hate getting up from programming, going to the coffee pot, and finding out someone from marketing has taken the last cup and not made another pot.
817,232
As a programmer, I often look at some features of the language I'm currently using and think to myself "This is pretty hard to do for a programmer, and could be taken care of automatically by the machine". One example of such a feature is memory management, which has been automatic for a while in a variety of language...
2009/05/03
[ "https://Stackoverflow.com/questions/817232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80779/" ]
In C++, enum-to-string. In Ada, the language defines the 'image attribute of an enumerated type as a function that returns a string corresponding to the textual representation of an enumeration value. C++ provides no such clean facility. It takes several lines of very arcane preprocessor macro black magic to get a ro...
For languages that provide operator overloading, provide automatically generated overloads for symmetric operations when only one operation is defined. For example, if the programmer provides an equality operator but not an inequality operator, the language could easily generate one. In C++, the same could be done for ...
817,232
As a programmer, I often look at some features of the language I'm currently using and think to myself "This is pretty hard to do for a programmer, and could be taken care of automatically by the machine". One example of such a feature is memory management, which has been automatic for a while in a variety of language...
2009/05/03
[ "https://Stackoverflow.com/questions/817232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80779/" ]
[Concurrent programming](http://en.wikipedia.org/wiki/Concurrent_programming)/[parallelism](http://en.wikipedia.org/wiki/Parallelism_(computing)) that is (semi-)automated, opposed to having to mess around with threads, callbacks, and synchronisation. Being able to parallelise for loops, such as: ``` Parallel.ForEach(f...
Persistence, it seems to me we write far too much code to deal with persistence when this really should be a configuration problem.
3,780,695
I have a working dialog, and i want to change the content during the flow of the app, I mean to change the .html() property of the dialog... I thought it was easy to do but i can't seem to do: $dialog.dialog().html(**SOME CONTENT**); How do I do that after I already have the dialog running? My init code is: ``` va...
2010/09/23
[ "https://Stackoverflow.com/questions/3780695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/288219/" ]
Make sure that the `$dialog` variable is in scope where you're wanting to change the content, then just a [`.html()`](http://api.jquery.com/html/) call will work, like this: ``` $dialog.html(updatTable); ``` [You can see it working here](http://jsfiddle.net/nick_craver/Ldktu/).
``` $('#dialog ID').html('SOME CONTENT'); ```
2,559,104
Assume the image is only in black and white. Is there a software that can generate a matrix representation for the text on the image?
2010/04/01
[ "https://Stackoverflow.com/questions/2559104", "https://Stackoverflow.com", "https://Stackoverflow.com/users/198729/" ]
PKCS#7 is a cryptography standard published by RSA Security in 1993 that deals with data that has cryptography applied to it. Its a standard for how to package data securely. PKCS#7 references the X.509 standard, as the source for certificate formatting. X.509 is a wide ranging security standards document published in...
PKCS Components are PKCS#1, PKCS#5, PKCS#7, PKCS#8, PKCS#9, PKCS#10, and PKCS#12, PKCS standards are specifications produced by RSA Laboratories in cooperation with secure-system developers worldwide for the purpose of accelerating the deployment of public-key cryptography. A user can request a certificate from a Cert...
52,401,299
I am using **react-redux** to connect the data in my **Redux** store. I have discovered how to connect with selectors (as `mapStateToProps`) so data is available as props in React components when I need it. I have a React button component, and I have made props available to it. From other answers I think I can see how...
2018/09/19
[ "https://Stackoverflow.com/questions/52401299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4195899/" ]
this method should be something like this ``` protected void gwActivity_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Page") return; GridViewRow row = ((e.CommandSource as Control).NamingContainer as GridViewRow); string ActivityID = row.Cells[1].Text; ViewState["Activ...
You can use Session here. Whenever a row is selected add the ID in the session and retrieve the value of the session object in the btUpdate click event and then null the session . Inside the gwActivity\_RowCommand() ``` Session["ActivityId"] += ";ActivityId"; ``` and inside btUpdate\_Click() ``` if(Session["Activi...
1,631,574
If you have a QImage wrapped inside a QLabel, is it possible to scale it up or down when you resize the window and maintain the aspect ratio (so the image doesn't become distorted)? I figured out that it can scale using setScaledContents(), and you can set a minimum and maximum size, but the image still loses its aspec...
2009/10/27
[ "https://Stackoverflow.com/questions/1631574", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197424/" ]
I'm showing this as C++, which is what the documentation I'm looking at is in. It shouldn't be too difficult to convert to python. You need to create a custom derivative of `QLayoutItem`, which overrides `bool hasHeightForWidth()` and `int heightForWidth( int width)` to preserve the aspect ratio somehow. You could eit...
Convert the image to a `QPixmap` (use `QPixmap.fromImage(img)`) and then, you can use [`scaledToHeight()`](http://doc.trolltech.com/4.5/qpixmap.html#scaledToHeight).
54,398,366
I want to show a confirmation message when you removing the product on the WooCommerce cart. I can't find any code or solution for it. ![Screenhost](https://i.stack.imgur.com/qW6so.png)
2019/01/28
[ "https://Stackoverflow.com/questions/54398366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10965621/" ]
I was experimenting with Anders answer however without much luck, then by utilising some git issue tracker and try - error method i figured out how its done for nsis with electron builder setup. so these are the steps you take: 1. download `inetc` plugin and unpack it, then open `Plugins` directory [![step2](https://...
I don't know anything about electron-builder but it looks like it stores its plug-ins in a folder called `nsis-resources`, it might be somewhere under `%localappdata%\electron-builder\cache` perhaps. You could also try searching for nsProcess.dll because that is one of the 3rd-party plug-ins it bundles. If all else fa...
5,042
With the AWS CLI you can assume a role using the `--profile` parameter: ``` aws --profile <profile_name> <service> <command> ``` e.g.: ``` aws --profile admin s3 ls s3://mybucket/ ``` That profile can be an AWS role that os to be assumed. My problem with that is that the session of the role is only valid for one ...
2018/09/24
[ "https://devops.stackexchange.com/questions/5042", "https://devops.stackexchange.com", "https://devops.stackexchange.com/users/9850/" ]
You can set a maximum duration of up to 12 hours in the IAM Role config: [![enter image description here](https://i.stack.imgur.com/d9qAj.png)](https://i.stack.imgur.com/d9qAj.png) Hope that helps.
Along with changing the MaxSessionDuration(as mentioned in the above answer) of the IAM role ,also try adding/changing "duration\_seconds" parameter value in the credentials file of the configured profile.
3,347,782
I'm shortly to start on an integration project that will require organisational data (line reporting etc) and starter/leaver events etc. We utilise SAP HCM, but I have no experience of SAP (BizTalk/.NET developer), and I'm still attempting to find the right people to talk to in our organisation about how to interface w...
2010/07/27
[ "https://Stackoverflow.com/questions/3347782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/204818/" ]
I'm not familiar with the HCM module specifically, but I can provide some general answers: 1. Generally, standard display functionality of the major business objects (like a User or a Job in the HR world) are exposeed via BAPIs. Assuming your Basis team has ICF (Internet Communication Framework) configured, it is pret...
> > Does SAP HCM expose master employee data "out of the box" via web > services. If not, does it require much to expose this on the SAP side? > > > There are very few web service for HR. However, an ABAP function or BAPI can be transformed into a web service using a menu option... if such a function does not exi...