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
2,123,395
I've noticed an annoying peculiarity in PHP (running 5.2.11). If one page includes another page (and both contain their own variables and functions), both pages are aware of each others' variables. However, their functions seem to be aware of no variables at all (except those declared within the function). **My quest...
2010/01/23
[ "https://Stackoverflow.com/questions/2123395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/254830/" ]
You need to use `global` before using outside-defined variables in a function scope: ``` function doStuff() { global $somevar, $myvar; echo "Main function says: $somevar and $myvar\n"; } ``` More detailed explanation provided at: <http://us.php.net/manual/en/language.variables.scope.php> As comments & othe...
While you could be using global variables, it's generally good practice to pass the variables in as parameters to the functions upon calling. This ensures you know exactly what variables a function is expecting for proper execution. This *is not a bug*, just *intended functionality*. ``` $someVar = 'hey'; $myVar = 'yo...
2,123,395
I've noticed an annoying peculiarity in PHP (running 5.2.11). If one page includes another page (and both contain their own variables and functions), both pages are aware of each others' variables. However, their functions seem to be aware of no variables at all (except those declared within the function). **My quest...
2010/01/23
[ "https://Stackoverflow.com/questions/2123395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/254830/" ]
You need to use `global` before using outside-defined variables in a function scope: ``` function doStuff() { global $somevar, $myvar; echo "Main function says: $somevar and $myvar\n"; } ``` More detailed explanation provided at: <http://us.php.net/manual/en/language.variables.scope.php> As comments & othe...
php has no scoping hierarchy, that is, functions are not aware of each others' (or global) variables. This is a bit weird if you worked with other languages before, but it's essentially a Good Thing, because globals are "evil". The best approach is to avoid them altogether.
2,123,395
I've noticed an annoying peculiarity in PHP (running 5.2.11). If one page includes another page (and both contain their own variables and functions), both pages are aware of each others' variables. However, their functions seem to be aware of no variables at all (except those declared within the function). **My quest...
2010/01/23
[ "https://Stackoverflow.com/questions/2123395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/254830/" ]
While you could be using global variables, it's generally good practice to pass the variables in as parameters to the functions upon calling. This ensures you know exactly what variables a function is expecting for proper execution. This *is not a bug*, just *intended functionality*. ``` $someVar = 'hey'; $myVar = 'yo...
php has no scoping hierarchy, that is, functions are not aware of each others' (or global) variables. This is a bit weird if you worked with other languages before, but it's essentially a Good Thing, because globals are "evil". The best approach is to avoid them altogether.
26,510,679
After reading these two posts: * [++someVariable Vs. someVariable++ in Javascript](https://stackoverflow.com/questions/3469885/somevariable-vs-somevariable-in-javascript) * <http://community.sitepoint.com/t/variable-vs-variable/6371> I am still confused on the following code: ``` var num = 0; num++ // returns 0 +...
2014/10/22
[ "https://Stackoverflow.com/questions/26510679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6475188/" ]
Maybe looking at the specification helps. [Postfix increment operator](http://www.ecma-international.org/ecma-262/5.1/#sec-11.3.1) (`num++`) -------------------------------------------------------------------------------------------------- > > The production *PostfixExpression : LeftHandSideExpression [no LineTermin...
Take the following example: ``` var num = 0; var result = 0; ``` The following: ``` result = num++; ``` Is equal to saying: ``` result = num; num = num + 1; ``` On the other hand, this: ``` result = ++num; ``` Is more equitable with this: ``` num = num + 1; result = num; ``` The two statements are kinda...
26,510,679
After reading these two posts: * [++someVariable Vs. someVariable++ in Javascript](https://stackoverflow.com/questions/3469885/somevariable-vs-somevariable-in-javascript) * <http://community.sitepoint.com/t/variable-vs-variable/6371> I am still confused on the following code: ``` var num = 0; num++ // returns 0 +...
2014/10/22
[ "https://Stackoverflow.com/questions/26510679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6475188/" ]
Maybe looking at the specification helps. [Postfix increment operator](http://www.ecma-international.org/ecma-262/5.1/#sec-11.3.1) (`num++`) -------------------------------------------------------------------------------------------------- > > The production *PostfixExpression : LeftHandSideExpression [no LineTermin...
When you type `num++` as a statement, JavaScript will evaluate `num` first -- which is why it's showing the zero -- then increment. That's why it's called the *post*-increment operator. If you were to do this, you'll see what's happening more clearly: ``` var num = 0; num++; // Outputs 0 (current value, set in...
33,359,268
"Modify the car-painting example so that the car is painted with your favorite color if you have one; otherwise it is painted w/ the color of your garage (if the color is known); otherwise it is painted red." Car-painting example: car.color = favoriteColor || "black"; **How or what do I need to do to make my script w...
2015/10/27
[ "https://Stackoverflow.com/questions/33359268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4115586/" ]
**This is the correct answer to your question:** See my comments to get a better understanding of how this works. ``` if (favoriteColor) { car.color = favoriteColor; // If you have a favorite color, choose the favorite color. } else if (garageColor) { car.color = garageColor; // If the garage color is known, ch...
It just looks like you need to use double equals signs in your if statement. Use == when checking for equality. Try this: ``` car.color = favoriteColor || "red"; if (car.color == favoriteColor ){ alert("your car is " + favoriteColor); } else if (car.color == garageColor){ alert("your car is " + garageColor);...
33,359,268
"Modify the car-painting example so that the car is painted with your favorite color if you have one; otherwise it is painted w/ the color of your garage (if the color is known); otherwise it is painted red." Car-painting example: car.color = favoriteColor || "black"; **How or what do I need to do to make my script w...
2015/10/27
[ "https://Stackoverflow.com/questions/33359268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4115586/" ]
**This is the correct answer to your question:** See my comments to get a better understanding of how this works. ``` if (favoriteColor) { car.color = favoriteColor; // If you have a favorite color, choose the favorite color. } else if (garageColor) { car.color = garageColor; // If the garage color is known, ch...
Hope this code will be useful ``` function _showFavColor(getColor){ var favoriteColor = 'red'; var garageColor ="blue"; var carColor = getColor; if (carColor == favoriteColor ){ alert("your car is " + favoriteColor); } else if (carColor == garageColor){ alert("your car is " + garageColor); } else { ...
2,730,865
Background: * I have a short list of strings. * The number of strings is not always the same, but are nearly always of the order of a “handful” * In our database will store these strings in a 2nd normalised table * These strings are **never** changed once they are written to the database. We wish to be able to match ...
2010/04/28
[ "https://Stackoverflow.com/questions/2730865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/57159/" ]
Another way that pops in my head, chain xors with rotated hashes based on index: ``` int shift = 0; int result = 1; for(String s : strings) { result ^= (s.hashCode() << shift) | (s.hashCode() >> (32-shift)) & (1 << shift - 1); shift = (shift+1)%32; } ``` edit: reading the explanation given in effective java,...
A SQL-based solution could be based on the checksum and checksum\_agg functions. If I'm following it right, you have something like: ``` MyTable MyTableId HashCode MyChildTable MyTableId (foreign key into MyTable) String ``` with the various strings for a given item (MyTableId) stored in MyChildTable. To c...
2,730,865
Background: * I have a short list of strings. * The number of strings is not always the same, but are nearly always of the order of a “handful” * In our database will store these strings in a 2nd normalised table * These strings are **never** changed once they are written to the database. We wish to be able to match ...
2010/04/28
[ "https://Stackoverflow.com/questions/2730865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/57159/" ]
I see no reason not to concatenate the strings and compute the hashcode for the concatenation. As an analogy, say that I wanted to compute a MD5 checksum for a memory block, I wouldn't split the block up into smaller pieces and compute individual MD5 checksums for them and then combine them with some ad hoc method.
Using the `GetHashCode()` is not ideal for combining multiple values. The problem is that for strings, the hashcode is just a checksum. This leaves little entropy for similar values. e.g. adding hashcodes for ("abc", "bbc") will be the same as ("abd", "abc"), causing a collision. In cases where you need to be absolute...
2,730,865
Background: * I have a short list of strings. * The number of strings is not always the same, but are nearly always of the order of a “handful” * In our database will store these strings in a 2nd normalised table * These strings are **never** changed once they are written to the database. We wish to be able to match ...
2010/04/28
[ "https://Stackoverflow.com/questions/2730865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/57159/" ]
A SQL-based solution could be based on the checksum and checksum\_agg functions. If I'm following it right, you have something like: ``` MyTable MyTableId HashCode MyChildTable MyTableId (foreign key into MyTable) String ``` with the various strings for a given item (MyTableId) stored in MyChildTable. To c...
Let's solve your root problem. Don't use a hashcode. Just add a integer primary key for each String
2,730,865
Background: * I have a short list of strings. * The number of strings is not always the same, but are nearly always of the order of a “handful” * In our database will store these strings in a 2nd normalised table * These strings are **never** changed once they are written to the database. We wish to be able to match ...
2010/04/28
[ "https://Stackoverflow.com/questions/2730865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/57159/" ]
I see no reason not to concatenate the strings and compute the hashcode for the concatenation. As an analogy, say that I wanted to compute a MD5 checksum for a memory block, I wouldn't split the block up into smaller pieces and compute individual MD5 checksums for them and then combine them with some ad hoc method.
Let's solve your root problem. Don't use a hashcode. Just add a integer primary key for each String
2,730,865
Background: * I have a short list of strings. * The number of strings is not always the same, but are nearly always of the order of a “handful” * In our database will store these strings in a 2nd normalised table * These strings are **never** changed once they are written to the database. We wish to be able to match ...
2010/04/28
[ "https://Stackoverflow.com/questions/2730865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/57159/" ]
Standard java practise, is to simply write ``` final int prime = 31; int result = 1; for( String s : strings ) { result = result * prime + s.hashCode(); } // result is the hashcode. ```
If you happen to use Java, you can create an array of strings (or convert a collection to an array), and then use `Arrays.hashCode()` as documented [here](https://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html#hashCode(java.lang.Object[])).
2,730,865
Background: * I have a short list of strings. * The number of strings is not always the same, but are nearly always of the order of a “handful” * In our database will store these strings in a 2nd normalised table * These strings are **never** changed once they are written to the database. We wish to be able to match ...
2010/04/28
[ "https://Stackoverflow.com/questions/2730865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/57159/" ]
I see no reason not to concatenate the strings and compute the hashcode for the concatenation. As an analogy, say that I wanted to compute a MD5 checksum for a memory block, I wouldn't split the block up into smaller pieces and compute individual MD5 checksums for them and then combine them with some ad hoc method.
So I understand, you effectively have some set of strings that you need to identify by hash code, and that set of strings that you need to identify among will never change? If that's the case, it doesn't particularly matter, so long as the scheme you use gives you unique numbers for the different strings/combinations ...
2,730,865
Background: * I have a short list of strings. * The number of strings is not always the same, but are nearly always of the order of a “handful” * In our database will store these strings in a 2nd normalised table * These strings are **never** changed once they are written to the database. We wish to be able to match ...
2010/04/28
[ "https://Stackoverflow.com/questions/2730865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/57159/" ]
Your first option has the only inconvenience of `(String1, String2)` producing the same hashcode of `(String2, String1)`. If that's not a problem (eg. because you have a fix order) it's fine. "*Cat all the string together then get the hashcode*" seems the more natural and secure to me. *Update*: As a comment points o...
A SQL-based solution could be based on the checksum and checksum\_agg functions. If I'm following it right, you have something like: ``` MyTable MyTableId HashCode MyChildTable MyTableId (foreign key into MyTable) String ``` with the various strings for a given item (MyTableId) stored in MyChildTable. To c...
2,730,865
Background: * I have a short list of strings. * The number of strings is not always the same, but are nearly always of the order of a “handful” * In our database will store these strings in a 2nd normalised table * These strings are **never** changed once they are written to the database. We wish to be able to match ...
2010/04/28
[ "https://Stackoverflow.com/questions/2730865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/57159/" ]
I see no reason not to concatenate the strings and compute the hashcode for the concatenation. As an analogy, say that I wanted to compute a MD5 checksum for a memory block, I wouldn't split the block up into smaller pieces and compute individual MD5 checksums for them and then combine them with some ad hoc method.
If you happen to use Java, you can create an array of strings (or convert a collection to an array), and then use `Arrays.hashCode()` as documented [here](https://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html#hashCode(java.lang.Object[])).
2,730,865
Background: * I have a short list of strings. * The number of strings is not always the same, but are nearly always of the order of a “handful” * In our database will store these strings in a 2nd normalised table * These strings are **never** changed once they are written to the database. We wish to be able to match ...
2010/04/28
[ "https://Stackoverflow.com/questions/2730865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/57159/" ]
Standard java practise, is to simply write ``` final int prime = 31; int result = 1; for( String s : strings ) { result = result * prime + s.hashCode(); } // result is the hashcode. ```
I see no reason not to concatenate the strings and compute the hashcode for the concatenation. As an analogy, say that I wanted to compute a MD5 checksum for a memory block, I wouldn't split the block up into smaller pieces and compute individual MD5 checksums for them and then combine them with some ad hoc method.
2,730,865
Background: * I have a short list of strings. * The number of strings is not always the same, but are nearly always of the order of a “handful” * In our database will store these strings in a 2nd normalised table * These strings are **never** changed once they are written to the database. We wish to be able to match ...
2010/04/28
[ "https://Stackoverflow.com/questions/2730865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/57159/" ]
I see no reason not to concatenate the strings and compute the hashcode for the concatenation. As an analogy, say that I wanted to compute a MD5 checksum for a memory block, I wouldn't split the block up into smaller pieces and compute individual MD5 checksums for them and then combine them with some ad hoc method.
I hope this is unnecessary, but since you don't mention anything which sounds like you're only using the hashcodes for a first check and then later verifying that the strings are actually equal, I feel the need to warn you: **Hashcode equality != value equality** There will be lots of sets of strings which yield the ...
57,278,351
I built my bot using Direct Line and authentication works there. But when I deployed my bot to MS Teams, pressing the sign in button does nothing at all. I used the following code: ``` AddDialog(new OAuthPrompt( nameof(OAuthPrompt), new OAuthPromptSettings { ConnectionName = ConnectionName, ...
2019/07/30
[ "https://Stackoverflow.com/questions/57278351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1404347/" ]
How are you testing the Teams app? Did you side-load it into your Teams environment? When you are using Azure Bot Service for Authentication in Teams, you need [to whitelist the domain in your Bot Manifest](https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/authentication/auth-oauth-card#getting-started...
Some weeks ago, we faced the same problem. Luckily, a few weeks ago, Microsoft uploaded a sample: <https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/javascript_nodejs/46.teams-auth> The key here is to use TeamsActivityHandler (found inside teamsActivityHandler.js file) instead of ActivityHandler whe...
45,946
In ancient Western times civilians were considered legitimate spoils of war for the victor. Sometime in Western Europe that seems to have changed. While Otto von Bismarck waged symbolic wars in Europe with very little casualties besides largely willing soldiers on the battlefields, colonial wars with indigenous people ...
2018/05/02
[ "https://history.stackexchange.com/questions/45946", "https://history.stackexchange.com", "https://history.stackexchange.com/users/12990/" ]
First, let's clarify; declaring something illegal does not prevent people from doing that thing. Burglary is illegal, but it happens. Sexual harassment is illegal, but it happens. So all of the examples listed are... not really relevant to understanding or answering the question. The examples lead more to confusion tha...
I'd put forward there was an inflection point that occurred at some point during the 19th century. It's probably not a single event, and one could probably go on at length as to the precise reasons. You can see clearcut evidence of this on the eve of the Boxer War. In response to the atrocities in China, the German Em...
15,594
I am reading in the book of Exodus chapter 3 (KJV) about the angel of the Lord appearing to Moses in the burning bush.It is written, **Exodus 3:2** > > And the angel of the Lord appeared unto him in a flame of fire out of > the midst of a bush: and he looked, and, behold, the bush burned with > fire, and the bush ...
2015/02/01
[ "https://hermeneutics.stackexchange.com/questions/15594", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/2572/" ]
The angel appears in the bush alone, we are told nothing of God being there. Angels appear to many in scripture without the presence of fire, so it seems unnecessary to think the bush is burning because if the angel, but rather it is an additional sign to Moses that it burned without being consumed. Moses turning his...
The Angel of the Lord(AOTL) or the Angel of God, is distinct from other angels in the bible and should not be confused with an a ordinary angel". In the Old testament the AOTL has the divine authority to forgive "transgressions",(Exodus 23:21); receive worship (Joshua 5:14)(Gen 18:2; Num 22:31) bless generations (Gen 2...
15,594
I am reading in the book of Exodus chapter 3 (KJV) about the angel of the Lord appearing to Moses in the burning bush.It is written, **Exodus 3:2** > > And the angel of the Lord appeared unto him in a flame of fire out of > the midst of a bush: and he looked, and, behold, the bush burned with > fire, and the bush ...
2015/02/01
[ "https://hermeneutics.stackexchange.com/questions/15594", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/2572/" ]
I agree with the earlier response that G-d was not standing with the angel in the burning bush. A common way by which G-d communicates with the Patriarchs in Genesis and Exodus is through an angel. As the Hebrew word מַלְאָךְ can mean either "angel" or "messenger," it is clear even in antiquity that G-d communicated th...
The Angel of the Lord(AOTL) or the Angel of God, is distinct from other angels in the bible and should not be confused with an a ordinary angel". In the Old testament the AOTL has the divine authority to forgive "transgressions",(Exodus 23:21); receive worship (Joshua 5:14)(Gen 18:2; Num 22:31) bless generations (Gen 2...
15,594
I am reading in the book of Exodus chapter 3 (KJV) about the angel of the Lord appearing to Moses in the burning bush.It is written, **Exodus 3:2** > > And the angel of the Lord appeared unto him in a flame of fire out of > the midst of a bush: and he looked, and, behold, the bush burned with > fire, and the bush ...
2015/02/01
[ "https://hermeneutics.stackexchange.com/questions/15594", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/2572/" ]
When one has the understanding of a theophany/christophany , then the explanation of who was in the burning bush would be more easily understood, especially in the case of Shadrach, Meshach, and Abednego. As in Daniel 3:24 it reads: "I see four men loose, walking in the midst of the fire, and they have no hurt; and the...
The Angel of the Lord(AOTL) or the Angel of God, is distinct from other angels in the bible and should not be confused with an a ordinary angel". In the Old testament the AOTL has the divine authority to forgive "transgressions",(Exodus 23:21); receive worship (Joshua 5:14)(Gen 18:2; Num 22:31) bless generations (Gen 2...
15,594
I am reading in the book of Exodus chapter 3 (KJV) about the angel of the Lord appearing to Moses in the burning bush.It is written, **Exodus 3:2** > > And the angel of the Lord appeared unto him in a flame of fire out of > the midst of a bush: and he looked, and, behold, the bush burned with > fire, and the bush ...
2015/02/01
[ "https://hermeneutics.stackexchange.com/questions/15594", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/2572/" ]
There are a few times in the Old Testament where *the Angel of The Lord* seems to be alternating with God speaking, and/or with the Angel saying and promising things we would only expect the Lord to say or promise (of course in Old Testament “Lord” just refers to God), yet after answering as “I” in a Godlike manner, th...
The Angel of the Lord(AOTL) or the Angel of God, is distinct from other angels in the bible and should not be confused with an a ordinary angel". In the Old testament the AOTL has the divine authority to forgive "transgressions",(Exodus 23:21); receive worship (Joshua 5:14)(Gen 18:2; Num 22:31) bless generations (Gen 2...
56,427,168
I work behind a corporate firewall. I need pymssql library to use some queries. I try installing via pip, which gives me the error: > > 'pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.' > > > I install openssl as mentioned by multiple answers in this site...
2019/06/03
[ "https://Stackoverflow.com/questions/56427168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7255472/" ]
Ok figured this out after paying more attention to the error message. In packages\Umbraco.SqlServerCE.4.0.0.1\build\Umbraco.SqlServerCE.targets it needed the namepsace i added it there and now it builds. Issue now is figuring out how to get updated package for that dependancy
I just wanted to expand on Ismail's answer. His solution is correct however if you are wondering on how to add the namespace and get it running the file should look like this: [Solution](https://i.stack.imgur.com/l6FBw.jpg)
23,365,857
I noticed, that MingW and GCC compilers use multiple cores if available. For example: ``` for (long i = 0; i < 100000; ++i) { some_complicated_calculation(); } ``` If I open up a Task Manager / System Monitor, I can see that multiple (for me: 2) cores are used. How the compiler decides, which code can run on m...
2014/04/29
[ "https://Stackoverflow.com/questions/23365857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1784001/" ]
It is using a single core as long as there is nothing special inside some\_complicated\_calculation() that creates threads or uses async (C++11) or similar. The activity you see on the task manager cannot be related to the executable that iterates. It could be totally unrelated to what you are working on.
Looks like thread\_bind\_to\_processor provided in GNU software radio is what you're looking for: <http://gnuradio.org/doc/doxygen/namespacegr_1_1thread.html#aab5195edcd94db5c71ecbfef9d578fb7>
3,668,250
I have two functions ``` function ShowCrossWord(var randN) { randomnumber = randN; $(document).ready(function() { $.get("crosswords.xml",{},function(xml){ $('crossword',xml).each(function(i) { }); }); }); } ``` and ``` function ShowLegend(var randN) { randomnumber = ...
2010/09/08
[ "https://Stackoverflow.com/questions/3668250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/348168/" ]
What were you expecting to happen, and what actually happened? So things I can see: * You never do anything with the XML data. I presume it is not even being returned? * You may need to specify a [dataType attribute](http://api.jquery.com/jQuery.get/) of "xml" so jQuery knows what type of data the server is returning...
I would guess your mimetype of the XML sent from the server is wrong. It's very picky to get that right, or the XML will not be parsed on the client. You could try to register callback functions for success and error and log the error message and the XMLHTTPRequest object.
36,593,615
Can someone show me ho can i use the variables stored in this Ajax call: ``` $.get( "nuoviServiziReview.html", function( data ) { var nuovoServizioReview = $('<div/>',{id:'servizio'+ incremento}); nuovoServizioReview.html(data); nuovoServizioReview.appendTo(...
2016/04/13
[ "https://Stackoverflow.com/questions/36593615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5832977/" ]
markup: ``` <ItemTemplate> <asp:Label ID="lblStage" runat="server" Text='<%#ShowStage(Eval("codingStage"))%>'></asp:Label> </ItemTemplate> ``` in code behind: ``` protected string ShowStage(int codingStage) { switch (codingStage) { case 0: return "All"; ...
In the same RowDataBound event, check e.RowRowType to detect the Header row. Once you are in the Header row, find the dropdown with a FindControl call. Once you have the dropdown, save the selected value are text in an instance variable. Then you can access it when RowDataBound fires for data rows.
41,899,192
could someone explain me about this code please? ``` public class Counter { private AtomicInteger value = new AtomicInteger(); public int incrementLongVersion(){//THIS PART2!!! int oldValue = value.get(); while (!value.compareAndSet(oldValue, oldValue+1)){ ...
2017/01/27
[ "https://Stackoverflow.com/questions/41899192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5355260/" ]
If `incrementLongVersion` is called from multiple threads, `value.compareAndSet(oldValue, oldValue+1)` may return `false`. The purpose of the `while` loop is to make sure that the function returns a value that's unique among all working threads. A better way to implement this would be to simply use `incrementAndGet` f...
It is always `false` because **you know** what that function do, however the compiler does not analyze the body of given method call to check the return value will always be the same, false in this case.
46,704,318
**Edit** So many good answers and all of them work! Thanks a lot guys :) I wish I could mark all of them as solved! **----** Good day Let's say I have these 2 text inputs: ``` <input type="text" id="plt_quantity_sum"/> <!-- this should calculate the "#quantity" where each "#uom_value" is "PLT" --> <input type="tex...
2017/10/12
[ "https://Stackoverflow.com/questions/46704318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6294563/" ]
Your query will goes like this. ``` $query = mysqli_query($conn, "INSERT INTO tab (ltime) VALUES ('$time')"); ```
Your query should be like this ``` $query = mysqli_query($conn, "INSERT INTO tab (ltime) VALUES ($time)"); ```
46,704,318
**Edit** So many good answers and all of them work! Thanks a lot guys :) I wish I could mark all of them as solved! **----** Good day Let's say I have these 2 text inputs: ``` <input type="text" id="plt_quantity_sum"/> <!-- this should calculate the "#quantity" where each "#uom_value" is "PLT" --> <input type="tex...
2017/10/12
[ "https://Stackoverflow.com/questions/46704318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6294563/" ]
Your query will goes like this. ``` $query = mysqli_query($conn, "INSERT INTO tab (ltime) VALUES ('$time')"); ```
Columns and tables should have backticks and not single quotes ``` INSERT INTO `tab` (`ltime`) VALUES ($time) ```
46,704,318
**Edit** So many good answers and all of them work! Thanks a lot guys :) I wish I could mark all of them as solved! **----** Good day Let's say I have these 2 text inputs: ``` <input type="text" id="plt_quantity_sum"/> <!-- this should calculate the "#quantity" where each "#uom_value" is "PLT" --> <input type="tex...
2017/10/12
[ "https://Stackoverflow.com/questions/46704318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6294563/" ]
Your query will goes like this. ``` $query = mysqli_query($conn, "INSERT INTO tab (ltime) VALUES ('$time')"); ```
``` $query = mysqli_query($conn, "INSERT INTO tab (ltime) VALUES ($time)"); ``` Don't use '' when assigning the column name
46,704,318
**Edit** So many good answers and all of them work! Thanks a lot guys :) I wish I could mark all of them as solved! **----** Good day Let's say I have these 2 text inputs: ``` <input type="text" id="plt_quantity_sum"/> <!-- this should calculate the "#quantity" where each "#uom_value" is "PLT" --> <input type="tex...
2017/10/12
[ "https://Stackoverflow.com/questions/46704318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6294563/" ]
Your query will goes like this. ``` $query = mysqli_query($conn, "INSERT INTO tab (ltime) VALUES ('$time')"); ```
The first way specifies both the column names and the values to be inserted: ``` INSERT INTO table_name (column1, column2, column3, ...)VALUES (value1, value2, value3, ...); ``` If you are adding values for all the columns of the table, you do not need to specify the column names in the SQL query ``` INSERT INTO ta...
10,727,140
I was wondering if there is a way to use my GPU to speed up the training of a network in PyBrain.
2012/05/23
[ "https://Stackoverflow.com/questions/10727140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/896317/" ]
Unless PyBrain is designed for that, you probably can't. You might want to try running your trainer under PyPy if you aren't already -- it's significantly faster than CPython for some workloads. Perhaps this is one of those workloads. :)
Checkout Pylearn2: <https://github.com/lisa-lab/pylearn2> It's a newer library and can run on GPU's with CUDA via cuda-convnet.
69,641,330
I am trying to write a PowerShell script that will return me a JSON...This is what I have been able to get. ``` $stepBase = @{} $wizardDataArray = @{} $stepTypeData =@{} $step = New-Object System.Collections.ArrayList $wizardData = @{"mode"="Add"; "resourceName"="basicServer"; "serverName"="demoServer"; "serverAddres...
2021/10/20
[ "https://Stackoverflow.com/questions/69641330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14279707/" ]
Try this... ``` $stepBase = @{} $step = New-Object System.Collections.ArrayList $wizardData = @{"mode"="Add"; "resourceName"="basicServer"; "serverName"="demoServer"; "serverAddress"="xyz.abc.info"; "activeDbCatalog"="demodb";} $stepData = @{"wizardType"="demoServer"; "wizardData"=$wizardData} $step.Add(@{"stepType...
so what if you skip the very last assignment and convert `$step` to JSON? like so: ``` $wizardDataArray = @{} $stepTypeData =@{} $step = New-Object System.Collections.ArrayList $wizardData = @{"mode"="Add"; "resourceName"="basicServer"; "serverName"="demoServer"; "serverAddress"="xyz.abc.info"; "activeDbCatalog"="dem...
25,870,519
We have recently upgraded from Drools 5 to Drools 6 and have run into disturbing conflict issues. We have `kie-ci` imported into out project. `kie-ci` brings in `sisu-guava`. `sisu-guava` changes the accessibility of some of the classes from google's guava. Unfortunately, it uses the same package name as google's guav...
2014/09/16
[ "https://Stackoverflow.com/questions/25870519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/416300/" ]
As far I know, the answer would be **NO**. There is winforms class [Screen.cs](http://referencesource.microsoft.com/#System.Windows.Forms/ndp/fx/src/winforms/Managed/System/WinForms/Screen.cs) that can do few basic things, but that does not expose monitor display name. It exposes though DeviceName that can be used for ...
Maybe over the Registry? It will got through all your Displays. It will return the Name out of the EDID. BUT, there was a Change in Win10! Win10 has no "Control" but a "Properties" SubKey (Workaround at the IF/OR) #untested! ``` Public Function GetMonitorDetails() As List(Of String()) Dim sReturn As List(Of Strin...
71,883,207
I'm trying to change the date format of my data from (11 20, 2014) to 2014-11-20. I tried this: ``` df.withColumn("newDate", to_date(col("reviewTime"),("mm dd, yyyy"))) ``` Because the days with single digits appear as 1,2,8 instead of 01,02,08 I got this message: SparkUpgradeException: You may get a different resu...
2022/04/15
[ "https://Stackoverflow.com/questions/71883207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18812199/" ]
You can wrap the function in a macro, and use the preprocessor to get the variable name as a string. ``` #include <iostream> #include <string> #define printArray(x, y) printArrayElements((#x), x, y) void printArrayElements(std::string name, int num[], int size){ std::cout << "Array name: " << name << std::endl; ...
This is not possible with vanilla C++ at the moment, but you can use the preprocesser to do it: ``` #define PRINTNAME(name) (std::cout << "name" << ":" << (#name) << std::endl) ```
43,957,034
How do I specific a function can take a list of numbers which can be ints or floats? I tried making a new type using Union like so: ``` num = Union[int, float] def quick_sort(arr: List[num]) -> List[num]: ... ``` However, mypy didn't like this: ``` quickSortLomutoFirst.py:32: error: Argument 1 to "quickSort...
2017/05/13
[ "https://Stackoverflow.com/questions/43957034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5478942/" ]
The short answer to your question is you should use either TypeVars or Sequence -- using `List[Union[int, float]]` would actually potentially introduce a bug into your code! In short, the problem is that Lists are *invariant* according to the PEP 484 type system (and in many other typesystems -- e.g. Java, C#...). You...
From [PEP 484](https://www.python.org/dev/peps/pep-0484/#id26), which proposed type hints: > > Rather than requiring that users write import numbers and then use `numbers.Float` etc., this PEP proposes a straightforward shortcut that is almost as effective: when an argument is annotated as having type `float`, an arg...
53,149,526
If we set up a Saga and immediately `Publish(context => ...)` then a message successfully hits the bus. If however, we have something like ``` Initially( When(SomeCommand) .Then(context => { context.Instance.SomeField = 5 }) .TransitionTo(SomeState) .Then(context => this.RaiseEvent(context.Instance, ...
2018/11/05
[ "https://Stackoverflow.com/questions/53149526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/838163/" ]
I'd do this natively in bash using a `for` loop, rather than using `find`. I honestly can't remember if bash makes any promises about the order in which globs will be processed. So, using the sample date you included, here's a one-liner that compares files using `[[`: ``` $ declare -A last=(); for a in *; do for b in...
You're tailing the output of the command with `tail -1`. So you will only get the very last line. :) Beyond that your command looks correct. Couple other notes: 1. You can write `find .` without the glob because find is recursive by default 2. `???????????` could be more restrictive if you needed. `??????_????` or u...
53,149,526
If we set up a Saga and immediately `Publish(context => ...)` then a message successfully hits the bus. If however, we have something like ``` Initially( When(SomeCommand) .Then(context => { context.Instance.SomeField = 5 }) .TransitionTo(SomeState) .Then(context => this.RaiseEvent(context.Instance, ...
2018/11/05
[ "https://Stackoverflow.com/questions/53149526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/838163/" ]
I'd do this natively in bash using a `for` loop, rather than using `find`. I honestly can't remember if bash makes any promises about the order in which globs will be processed. So, using the sample date you included, here's a one-liner that compares files using `[[`: ``` $ declare -A last=(); for a in *; do for b in...
The idea to use `sort -u` and `tail -1` is good, and it'll work when used with the list of sub directories from within the same parent directory. The `-u` is going to remove duplicates, but this is not needed because 2 sub directories cannot have the same name within the same parent directory. `?` means any chars; a m...
53,149,526
If we set up a Saga and immediately `Publish(context => ...)` then a message successfully hits the bus. If however, we have something like ``` Initially( When(SomeCommand) .Then(context => { context.Instance.SomeField = 5 }) .TransitionTo(SomeState) .Then(context => this.RaiseEvent(context.Instance, ...
2018/11/05
[ "https://Stackoverflow.com/questions/53149526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/838163/" ]
I'd do this natively in bash using a `for` loop, rather than using `find`. I honestly can't remember if bash makes any promises about the order in which globs will be processed. So, using the sample date you included, here's a one-liner that compares files using `[[`: ``` $ declare -A last=(); for a in *; do for b in...
Using find, sort, awk: ``` find -name '??????_????' -type d | sort -r | awk -F'/' '{if(!s[$(NF-1)]++) print $0} ```
57,595
Looking at the 3rd edition of *Space Mission Analysis and Design* by Wertz and Larson, their equation (13-4) presents the link equation, $\frac{E\_b}{N\_0} = \frac{PL\_\ell G\_t L\_s L\_a G\_r}{k T\_s R}$, with $E\_b/N\_0$ being the receiver energy per bit over noise density, $P$ is transmitter power, $L\_\ell$ is tr...
2022/01/05
[ "https://space.stackexchange.com/questions/57595", "https://space.stackexchange.com", "https://space.stackexchange.com/users/8350/" ]
Lpr and Lpt would be pointing loss, receiver and pointing loss, transmitter, respectively.
As [@TFC points out](https://space.stackexchange.com/a/60291/12102) the $L\_{p}$s are probably *pointing losses* due to pointing errors away from maximum gain. In this case the gains $G$ would have to be the maximum gains for *ideally pointed antennas* from which this pointing error loss should be deducted. Alternativ...
1,091,669
I need a JavaScript library, or Flash as well, which allows to connect events to "click" over "arcs" in graphics. I've implemented my graphic through the JS-Graphs library, but I can only intercept the "click" event on "nodes", not on "arcs".
2009/07/07
[ "https://Stackoverflow.com/questions/1091669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39339/" ]
If you're interesting in using Flex, you may also want to take a look at Josh' Tynjala's [Wires UI](http://joshblog.net/2008/11/10/open-source-flex-project-wires-ui-library/) library.
[WireIt](http://javascript.neyric.com/wireit/) might be similar to what you're looking for. However, they use the YUI library and Canvas, so YMMV.
3,860,002
Prove that if $f$ is differentiable at $c$, then $f'(c) = \lim\_{h\to 0}{f(c+h)-f(c)\over h}$. I did this: If f is differentiable at $c$, then it's continuous at $c$, which implies, $\lim\_{x\to c}$ $f(x)=f(c)$ if only if $\lim\_{h\to 0}$ $f(c+h)-f(c)=0$. Then dividing by $h$, $$\lim\_{h\to 0}{f(c+h)-f(c)\over h}=f...
2020/10/11
[ "https://math.stackexchange.com/questions/3860002", "https://math.stackexchange.com", "https://math.stackexchange.com/users/832388/" ]
So, from what I understand, the question boils down to showing the equivalence of two definitions of the derivative. Here's what you begin with: > > If $f$ is differentiable at $x=a$, the following limit exists and is equal to $f'(a)$: > $\lim\_{x\to a} {f(x)-f(a)\over x-a}$ > > > Now, put $x-a=h$, that is $x = a...
The definition of $f'(c)$ is that if $\lim\_{h\to 0}\frac {f(c+h)-f(c)}{h}$ exists then this limit is $f'(c),$ and if this limit doesn't exist then $f'(c)$ doesn't exist. "$f $ is differentiable at $c$" is just another way to say that $f'(c)$ exists.
3,860,002
Prove that if $f$ is differentiable at $c$, then $f'(c) = \lim\_{h\to 0}{f(c+h)-f(c)\over h}$. I did this: If f is differentiable at $c$, then it's continuous at $c$, which implies, $\lim\_{x\to c}$ $f(x)=f(c)$ if only if $\lim\_{h\to 0}$ $f(c+h)-f(c)=0$. Then dividing by $h$, $$\lim\_{h\to 0}{f(c+h)-f(c)\over h}=f...
2020/10/11
[ "https://math.stackexchange.com/questions/3860002", "https://math.stackexchange.com", "https://math.stackexchange.com/users/832388/" ]
So, from what I understand, the question boils down to showing the equivalence of two definitions of the derivative. Here's what you begin with: > > If $f$ is differentiable at $x=a$, the following limit exists and is equal to $f'(a)$: > $\lim\_{x\to a} {f(x)-f(a)\over x-a}$ > > > Now, put $x-a=h$, that is $x = a...
Nevertheless, that answer is done and accepted, but looking comments under OP, let me say, that here we have question about equivalence of **differentiability** and **existence of derivative**: 1. **Differentiability** (Rudin W. - Principles of mathematical analysis-(1976) 212-213 p.). Suppose $f$ is defined on $(a,b)...
40,009,850
what is the meaning of the following command: ``` def run_initial(self) -> object: ``` I don't know why he put `object` after the arrow. What is the meaning of the object here?
2016/10/12
[ "https://Stackoverflow.com/questions/40009850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6680470/" ]
They are type annotations. Type annotations are type hints that were brought in with [pep-0484](https://www.python.org/dev/peps/pep-0484/). They were made to allow developers to use third party tools or modules that consume these to give more information to the user about types for example. The more obvious use case ...
It's a [Type aliases](https://www.python.org/dev/peps/pep-0484/).They were added in pep-404. Straight from the Python docs: > > A type aliases is defined by assigning the type to the alias...Type aliases are useful for simplifying complex type signatures...Note that None as a type hint is a special case and is repla...
45,494
Lets $E\_{\tau}^{\rho}$ be the elliptic curve with complex structure given by $\tau$ in upper half plane and complexified Kahler form $\rho \frac{dz\wedge d\bar{z}}{2}$.( $\rho$ is in upper half plane too) Then mirror symmetry says that mirror to $E\_{i}^{\rho}$ in A-side is $E^{i}\_{\rho}$ in B-side.(see the paper of...
2010/11/09
[ "https://mathoverflow.net/questions/45494", "https://mathoverflow.net", "https://mathoverflow.net/users/5259/" ]
The mirror of $E^\rho\_\tau$ is $E^\tau\_\rho$, as you may have guessed. The reason this is not discussed in, say, Polishchuk/Zaslow is that the derived category does not depend on the symplectic structure, and the Fukaya category does not depend on the complex structure, so for their purposes the parameter $\tau$ is i...
I think the answer is: $E\_{\tau}^{\rho/\tau\_{im}} \leftrightarrow E\_{\rho}^{\tau/ \rho\_{im}}$ where $\tau\_{im}$ is the imaginary part of $\tau$ (a positive number). Infact the answer of AByer is correct if write everything in the coordinate $(x,y)$ for the point $x+i\tau=X+iY$ on $E\_{\tau}$ and not the $(X,Y)$.
41,720,270
I have following DataTable ``` DataTable dt = new dataTable(); ``` I have got this dataTable filled from some another method. It will have 50000 rows and 40 columns before executing following statements. Number of rows and columns may vary. hence I have not defined specific set of columns to the dataTable. I want ...
2017/01/18
[ "https://Stackoverflow.com/questions/41720270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2116540/" ]
You need to access the rows using explicit indexes, and the row index would be a perfect way to do this. You should be able to create an array equal to the number of rows you have (e.g. 50000) with an index for each row as the values of that array (e.g. 0..1..2..3.. and so on), and then use a parallel loop on that arr...
An upgrade of @Shane Oborn 's answer without extra variable of ArrayOfIndexes and uses separate lock object. I would use: ``` var lockObj = new object(); Parallel.Foreach(dt.AsEnumerable(), row => { lock(lockObj) { row["guid"] = sessionIDValue; row["addeddate"] = todayDt; } }); ``` ...
37,152,501
I submit my code to a spark stand alone cluster. Submit command is like below: ``` nohup ./bin/spark-submit \ --master spark://ES01:7077 \ --executor-memory 4G \ --num-executors 1 \ --total-executor-cores 1 \ --conf "spark.storage.memoryFraction=0.2" \ ./myCode.py 1>a.log 2>b.log & ``` I specify the executor use...
2016/05/11
[ "https://Stackoverflow.com/questions/37152501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5245972/" ]
> > **Disclaimer:** this answer isn't based on debugging, but more on observations and the documentation Apache Spark provides > > > I don't believe that this is a bug to begin with! Looking at your configurations, we can see that you are focusing mostly on the executor tuning, which isn't wrong, but you are forg...
As I can see in your 5 lines, maybe the `groupBy` is the issue , would you try with `reduceBy`, and see how it performs. See [here](https://codereview.stackexchange.com/questions/115082/generic-reduceby-or-groupby-aggregate-functionality-with-spark-dataframe) and [here](https://databricks.gitbooks.io/databricks-spark-...
19,492,165
I want to have a reload button beside my captcha image to reload it with jquery in codeigniter. I searched the net to find a solution for it, but all I found confused me. this is my controller: ``` function create_captcha() { $expiration = time()-300; // Two hour limit $this->d...
2013/10/21
[ "https://Stackoverflow.com/questions/19492165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1269907/" ]
Append your `controller name` and use `ajax` like, ``` $(function(){ var base_url = '<?php echo base_url(); ?>'; $('.reload-captcha').click(function(event){ event.preventDefault(); $.ajax({ url:base_url+'dashboard/create_captcha?'+Math.random(), success:function(data){ ...
I changed Ruhan Kumar's code a little bit and could get the satisfying code: ``` <script> $(function(){ var base_url = '<?php echo base_url(); ?>'; $('.reload-captcha').click(function(event){ event.preventDefault(); $.ajax({ url:base_url+'admin/dashboar...
19,492,165
I want to have a reload button beside my captcha image to reload it with jquery in codeigniter. I searched the net to find a solution for it, but all I found confused me. this is my controller: ``` function create_captcha() { $expiration = time()-300; // Two hour limit $this->d...
2013/10/21
[ "https://Stackoverflow.com/questions/19492165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1269907/" ]
> > **#You may reload img by using ajax and javascript see my code** > > > **#You must create a folder captcha in your CI root folder** > > > **#The folder captcha permission to 777 or 666 mean(read, write for all)** > > > **#Then look like ci/captcha** > > > **#Then look like ci/application** > > > **My htm...
I changed Ruhan Kumar's code a little bit and could get the satisfying code: ``` <script> $(function(){ var base_url = '<?php echo base_url(); ?>'; $('.reload-captcha').click(function(event){ event.preventDefault(); $.ajax({ url:base_url+'admin/dashboar...
143,614
The way google is presenting as of today is totally different and I can no longer get the image pages so you can scroll the images before selecting one you want to see. Now there are individual boxes that click through. The entire appearance makes it no longer usuable.. Is there I can do to revert back to the way it wa...
2014/08/30
[ "https://apple.stackexchange.com/questions/143614", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/89211/" ]
I suspect it's an example of a new policy from Google, where they're deliberately showing old versions of their search pages if you use an out of date browser. You can find information about this from, for example, this [BBC news report](http://www.bbc.com/news/technology-29012038). It's probably a good idea to updat...
First I recommend you should update your Safari app. I just made a comparison using the same web site for Images. My Safari (7.0.6) + Chrome + Firefox show exactly the same. The top row shows the categories you can select (also as images). You can scroll down true the images or select a category.
32,194,958
I have a binary file from which I need to read 32 bit patterns- In the event if the EOF is reached such that its less than 32 bits - I need to error out saying unexpected eof else just break. I tried a lot but I am unable to get the incomplete bytes detecting part working. Can someone provide some pointer how to achiev...
2015/08/25
[ "https://Stackoverflow.com/questions/32194958", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3902763/" ]
Your code tells `fread` to read one record, containing 4 bytes, from the file. If the record is incomplete, it will return 0 (0 records read, error). If the record is missing (at end of file), it will also return 0 (0 records read, normal situation). You must adjust your code to distinguish these cases, by having `frea...
`fread` doesn't return the number of bytes read, it returns the number of items, whose size is given in the second argument, were read. Since you're asking for it to read 1 item; if it encounters EOF before reading all the bytes of the item, it should return `0`. Although `sizeof(char)` is defined to be `1`, it's not ...
72,621,032
My code: [enter image description here](https://i.stack.imgur.com/FBkHr.png) So the output is giving the very first line of the `results` list. My question is how to cut in each "url" element in one run to get the same result? Assume for loop would do?
2022/06/14
[ "https://Stackoverflow.com/questions/72621032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13813231/" ]
You need to map your proxy. And then iterate it.
Try seleniumwire with uc: [https://pypi.org/project/selenium-wire/#certificates:~:text=driver.wait\_for\_request()%20etc.-,Proxies,-If%20the%20site](https://pypi.org/project/selenium-wire/#certificates:%7E:text=driver.wait_for_request()%20etc.-,Proxies,-If%20the%20site) Worked for me
72,404,598
there are 5 column in 1st data frame . by using this find consecutive 1 from last D\_4 to D\_1, if find 0 in between then break and till that how many ones and that will be output [![1st input data frame](https://i.stack.imgur.com/3I36k.png)](https://i.stack.imgur.com/3I36k.png) [![2nd input data frame](https://i.sta...
2022/05/27
[ "https://Stackoverflow.com/questions/72404598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18553146/" ]
`SignInManager<TUser>.PasswordSignInAsync` Method Attempts to sign in the specified userName and password combination as an asynchronous operation and return `Task<SignInResult>`. for bearer token use `CheckPasswordAsync`. its return a flag indicating whether the given password is valid for the specified user. ``` _us...
Depending how you want the client to store the token. If you want to deal with it in the client side you can `Return Ok(result.generatedToken)` but if you want to set it as a cookie I would recommend you to just Return Ok() but before that you set the cookie in the header of the response. You do this in the server ```...
46,527,281
even if I know that inheritance is discouraged and composition should be better I'd like to know how to handle inheritance with mobx state class and call a super class method that is already decorated with `@action.bound`. I have this code example (that can be easily executed in a comfortable [jsfiddle](https://jsfidd...
2017/10/02
[ "https://Stackoverflow.com/questions/46527281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/433685/" ]
I'm not sure why exactly, but the issue is the `action.bound`. If you bind `this` in the constructor and wrap the result in action (like this... `this.reset = action(this.reset.bind(this)`), then it appears to work okay. <https://jsfiddle.net/cr82ktdd/> ``` const { observable, action } = mobx; console.clear() class...
The problem is that you can't reassign the action, which has already been bounded JavaScript doesn't support binding several contexts to the same function. Remove **bound** and make a bind separately `const storePlus = new StorePlus() storePlus.reset = storePlus.reset.bind(storePlus) storePlus.reset()`
843,858
I want other computers (they are in local network) go to Virtualbox Localhost. can you explain me what to do or at least give me article link. in Virtualbox i have installed fedora19 and computers system is Windows 7.
2014/11/23
[ "https://superuser.com/questions/843858", "https://superuser.com", "https://superuser.com/users/392344/" ]
Guest in bridged mode will use same IP subnet as the host, other computers can access it directly. If it is in NAT mode, you can use port forwarding so when other computers access to specific port of the host, the traffic will forward to another port of the guest. [Here](https://www.virtualbox.org/manual/ch06.html#nat...
You probably need to change the network adapter settings to bridged mode. Right now, it's probably set to NAT'ed mode.
924,794
We have a situation where a number of Reps use there iPhones as hot spots. Not a problem on it's own. However, to prevent over use of data we would like them to Set the Wifi point as Metered when using the iPhone. Again, sounds simple - right? Enter Microsoft they have locked down the ability to toggle Metered connecti...
2018/08/03
[ "https://serverfault.com/questions/924794", "https://serverfault.com", "https://serverfault.com/users/479153/" ]
Your EC2 instances just don't have enough permissions to register with ECS cluster: > > Important > > > If you do not launch your container instance with the proper IAM > permissions, your Amazon ECS agent cannot connect to your cluster. > > > Check IAM role that you've assigned to your EC2 instances. It shoul...
this one is also necessary to make it work; Amazon ECS needs permissions to register and deregister container instances with your load balancer when tasks are created and stopped ``` { "Version": "2008-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Principal": { "Service": "ecs.amazona...
924,794
We have a situation where a number of Reps use there iPhones as hot spots. Not a problem on it's own. However, to prevent over use of data we would like them to Set the Wifi point as Metered when using the iPhone. Again, sounds simple - right? Enter Microsoft they have locked down the ability to toggle Metered connecti...
2018/08/03
[ "https://serverfault.com/questions/924794", "https://serverfault.com", "https://serverfault.com/users/479153/" ]
Your EC2 instances just don't have enough permissions to register with ECS cluster: > > Important > > > If you do not launch your container instance with the proper IAM > permissions, your Amazon ECS agent cannot connect to your cluster. > > > Check IAM role that you've assigned to your EC2 instances. It shoul...
We had an error in our user data script. I found the error in EC2 - my instance -> Monitor and troubleshoot -> Get system log. Our bash script in the user data had -ex flags on i.e. `#!/bin/bash -ex`, which tells the script to exit immediately as a failure on any errors. The EC2 task would finish starting and look heal...
16,712,869
``` function get_result_professions($key_word) { $sql = "SELECT users.name FROM users inner join users_has_professions on users_has_professions.users_id = users.id inner join professions on users_has_professions.professions_id = professions.id where professions.key_wor...
2013/05/23
[ "https://Stackoverflow.com/questions/16712869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2371512/" ]
Hangouts does not currently have a public API. That said, messages delivered to the Google Talk XMPP server (talk.google.com:5222) are still being delivered to users via Hangouts. This support is only extended to one-on-one conversations, so the notification can't be delivered to a group of users. The messages will ne...
I send alarms and other notifications with a python script (failures on database server, partitions without free space, etc), using hangouts. It's easy. Look at <http://www.administracion-linux.com/2014/07/enviar-mensajes-por-hangout-desde.html> to send hangouts.
16,712,869
``` function get_result_professions($key_word) { $sql = "SELECT users.name FROM users inner join users_has_professions on users_has_professions.users_id = users.id inner join professions on users_has_professions.professions_id = professions.id where professions.key_wor...
2013/05/23
[ "https://Stackoverflow.com/questions/16712869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2371512/" ]
Hangouts does not currently have a public API. That said, messages delivered to the Google Talk XMPP server (talk.google.com:5222) are still being delivered to users via Hangouts. This support is only extended to one-on-one conversations, so the notification can't be delivered to a group of users. The messages will ne...
There is pre-alpha library for sending hangouts messages on python: <https://pypi.python.org/pypi/hangups/0.1> The API have been reverse engineered and is not published (as someone posted in comments). Thus it might change a Google's will. Also, messages sent using XMPP ceased to be delivered to Hangouts users. I gue...
16,712,869
``` function get_result_professions($key_word) { $sql = "SELECT users.name FROM users inner join users_has_professions on users_has_professions.users_id = users.id inner join professions on users_has_professions.professions_id = professions.id where professions.key_wor...
2013/05/23
[ "https://Stackoverflow.com/questions/16712869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2371512/" ]
There is pre-alpha library for sending hangouts messages on python: <https://pypi.python.org/pypi/hangups/0.1> The API have been reverse engineered and is not published (as someone posted in comments). Thus it might change a Google's will. Also, messages sent using XMPP ceased to be delivered to Hangouts users. I gue...
I send alarms and other notifications with a python script (failures on database server, partitions without free space, etc), using hangouts. It's easy. Look at <http://www.administracion-linux.com/2014/07/enviar-mensajes-por-hangout-desde.html> to send hangouts.
43,207,563
I'm looking to do something like this non-working code in my Django template: ``` {% if os.environ.DJANGO_SETTINGS_MODULE == "settings.staging" %} ``` Is something like this possible? My workaround is creating a context processor to make the variable available across all templates, but wanted to know if there is a m...
2017/04/04
[ "https://Stackoverflow.com/questions/43207563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2532070/" ]
Use `context_processor`, do as below and you should be able to access `os.environ['DJANGO_SETTINGS_MODULE']` as `SETTING_TYPE` in templates. Example you can use `{% if SETTING_TYPE == "settings.staging" %}` > > project/context\_processors.py > > > ``` import os def export_vars(request): data = {} data['...
Extending on [@vinay kumar](https://stackoverflow.com/users/3951511/vinay-kumar)'s comment, you can create a custom template filter in the following way: > > application/template\_tags\_folder/template\_tags\_file.py > > > ``` from django.template.defaulttags import register import os @register.filter def env(ke...
45,306,469
So I found this effect and I'm trying to modify it to be loaded inside a DIV `myeffect`, for example: ``` <html> <head></head> <body> <div class="myeffect"></div> </body> </html> ``` I tried changing some variables but I'm not a JavaScript expert and I can't get it to work inside a DIC. The effec...
2017/07/25
[ "https://Stackoverflow.com/questions/45306469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Hope this helps ```js var speeds = []; var count = 1; var colors = ['#bf1e2e', '#ee4037', '#dc5323', '#e1861b', '#e1921e', '#f7ac40', '#f7e930', '#d1da22', '#8bc43f', '#38b349', '#008d42', '#006738', '#29b473', '#00a69c', '#26a9e1', '#1a75bb', '#2a388f', '#262161', '#652d90', '#8e2792', '#9e1f64', '#d91c5c', '#ed297...
The divs it uses are all dynamically generated and appended to the body using this method. ``` var drop = function(n, height, color) { $('body').append('<div class="drop" style="left:'+ n*15+'px;height:'+ height+'vh;background-color:'+ color+';"></div>') )...
45,306,469
So I found this effect and I'm trying to modify it to be loaded inside a DIV `myeffect`, for example: ``` <html> <head></head> <body> <div class="myeffect"></div> </body> </html> ``` I tried changing some variables but I'm not a JavaScript expert and I can't get it to work inside a DIC. The effec...
2017/07/25
[ "https://Stackoverflow.com/questions/45306469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Hope this helps ```js var speeds = []; var count = 1; var colors = ['#bf1e2e', '#ee4037', '#dc5323', '#e1861b', '#e1921e', '#f7ac40', '#f7e930', '#d1da22', '#8bc43f', '#38b349', '#008d42', '#006738', '#29b473', '#00a69c', '#26a9e1', '#1a75bb', '#2a388f', '#262161', '#652d90', '#8e2792', '#9e1f64', '#d91c5c', '#ed297...
This actually works for me now. ``` var speeds = []; var count = 1; var colors = ['#bf1e2e', '#ee4037', '#dc5323', '#e1861b', '#e1921e', '#f7ac40', '#f7e930', '#d1da22', '#8bc43f', '#38b349', '#008d42', '#006738', '#29b473', '#00a69c', '#26a9e1', '#1a75bb', '#2a388f', '#262161', '#652d90', '#8e2792', '#9e1f64', '#d...
45,306,469
So I found this effect and I'm trying to modify it to be loaded inside a DIV `myeffect`, for example: ``` <html> <head></head> <body> <div class="myeffect"></div> </body> </html> ``` I tried changing some variables but I'm not a JavaScript expert and I can't get it to work inside a DIC. The effec...
2017/07/25
[ "https://Stackoverflow.com/questions/45306469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
From what I could see you were missing 3 things in your codepen. 1. you were applying the change to 'html' not '.myeffect' In your js: ``` `var width = parseInt($('.myeffect').css('width'), 10);` ``` 2. you need to set a width to your '.myeffect' In your css: `.myeffect { width: 100px; }` 3. there was no mark...
The divs it uses are all dynamically generated and appended to the body using this method. ``` var drop = function(n, height, color) { $('body').append('<div class="drop" style="left:'+ n*15+'px;height:'+ height+'vh;background-color:'+ color+';"></div>') )...
45,306,469
So I found this effect and I'm trying to modify it to be loaded inside a DIV `myeffect`, for example: ``` <html> <head></head> <body> <div class="myeffect"></div> </body> </html> ``` I tried changing some variables but I'm not a JavaScript expert and I can't get it to work inside a DIC. The effec...
2017/07/25
[ "https://Stackoverflow.com/questions/45306469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
From what I could see you were missing 3 things in your codepen. 1. you were applying the change to 'html' not '.myeffect' In your js: ``` `var width = parseInt($('.myeffect').css('width'), 10);` ``` 2. you need to set a width to your '.myeffect' In your css: `.myeffect { width: 100px; }` 3. there was no mark...
This actually works for me now. ``` var speeds = []; var count = 1; var colors = ['#bf1e2e', '#ee4037', '#dc5323', '#e1861b', '#e1921e', '#f7ac40', '#f7e930', '#d1da22', '#8bc43f', '#38b349', '#008d42', '#006738', '#29b473', '#00a69c', '#26a9e1', '#1a75bb', '#2a388f', '#262161', '#652d90', '#8e2792', '#9e1f64', '#d...
56,239,093
I have some flow like below in a pipeline. ``` stage('Build') { build job: 'Build' } stage('Run') { build job: 'Run', parameters: [string(name: 'build_version', value: <to get from Build job>)] } ``` I am running a python script inside Build job as execute batch...
2019/05/21
[ "https://Stackoverflow.com/questions/56239093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4744901/" ]
`:onchange` is not the correct syntax to listen for a change event in vue, you also don't need to pass this.selectedValue into the method as it will be available in your data (you don't have access to `this` in a template). Try the following: Change `:onchange` to be: ``` @change="getStudents" ``` Update your `get...
use @change instead of :onchange
131,948
I am a new (3 months) software developer in a smallish software company (10 people). I've been given a new project which has complex and poorly documented requirements, and I've been asked to speak to my boss (who is a company director) before I begin work so he can show me what to do. I did contact him, asking him to ...
2019/03/19
[ "https://workplace.stackexchange.com/questions/131948", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101531/" ]
> > was I wrong in copying in the other directors in the email? > > > **yes**.. I understand that you were likely frustrated but CC-ing others in to what is basically a rant at your boss is unwise. It absolutely comes across as you wanting to air your grievance and annoyance with him in front of others and as an ...
It's so easy to parse the world in terms of justice—I have done so many times, myself. And if we are parsing the world that way, when someone does something that we perceive affects us negatively, it feels like an injustice. Suddenly a part of our brain says we have the high moral ground. Suddenly we feel like actions ...
131,948
I am a new (3 months) software developer in a smallish software company (10 people). I've been given a new project which has complex and poorly documented requirements, and I've been asked to speak to my boss (who is a company director) before I begin work so he can show me what to do. I did contact him, asking him to ...
2019/03/19
[ "https://workplace.stackexchange.com/questions/131948", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101531/" ]
It is not the best thing to do (actually, it was quite bad), but it is not a career-ending mistake provided you learn from this mistake and not make it a habit. In these kinds of situations (i.e. something not working), you should: * ask verbally (your colleagues or your boss) to whom you should report the problem i...
It's so easy to parse the world in terms of justice—I have done so many times, myself. And if we are parsing the world that way, when someone does something that we perceive affects us negatively, it feels like an injustice. Suddenly a part of our brain says we have the high moral ground. Suddenly we feel like actions ...
131,948
I am a new (3 months) software developer in a smallish software company (10 people). I've been given a new project which has complex and poorly documented requirements, and I've been asked to speak to my boss (who is a company director) before I begin work so he can show me what to do. I did contact him, asking him to ...
2019/03/19
[ "https://workplace.stackexchange.com/questions/131948", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101531/" ]
Your frustration level is pretty high right now, and it definitely came out in that email. You should probably seriously consider if working in a small company on projects with complex and poorly documented requirements while learning new technology is something you should be doing. Some people thrive on that kind of n...
I disagree with the other answers here. You absolutely did the right thing. The history you recounted demonstrated a clear pattern of behavior of ignoring your issues - promised meetings that don't take place, phone calls that aren't returned, etc. And if you'd followed the advice here, there would have been no consequ...
131,948
I am a new (3 months) software developer in a smallish software company (10 people). I've been given a new project which has complex and poorly documented requirements, and I've been asked to speak to my boss (who is a company director) before I begin work so he can show me what to do. I did contact him, asking him to ...
2019/03/19
[ "https://workplace.stackexchange.com/questions/131948", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101531/" ]
> > was I wrong in copying in the other directors in the email? > > > Yes, you were wrong. It's not clear what your goal was in copying others, but attempting to embarrass or undermine your boss is not a good career move. > > Maybe I should have sent it directly to him first. > > > Not maybe. You clearly ...
Your frustration level is pretty high right now, and it definitely came out in that email. You should probably seriously consider if working in a small company on projects with complex and poorly documented requirements while learning new technology is something you should be doing. Some people thrive on that kind of n...
131,948
I am a new (3 months) software developer in a smallish software company (10 people). I've been given a new project which has complex and poorly documented requirements, and I've been asked to speak to my boss (who is a company director) before I begin work so he can show me what to do. I did contact him, asking him to ...
2019/03/19
[ "https://workplace.stackexchange.com/questions/131948", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101531/" ]
> > was I wrong in copying in the other directors in the email? > > > Yes, you were wrong. It's not clear what your goal was in copying others, but attempting to embarrass or undermine your boss is not a good career move. > > Maybe I should have sent it directly to him first. > > > Not maybe. You clearly ...
> > was I wrong in copying in the other directors in the email? > > > **yes**.. I understand that you were likely frustrated but CC-ing others in to what is basically a rant at your boss is unwise. It absolutely comes across as you wanting to air your grievance and annoyance with him in front of others and as an ...
131,948
I am a new (3 months) software developer in a smallish software company (10 people). I've been given a new project which has complex and poorly documented requirements, and I've been asked to speak to my boss (who is a company director) before I begin work so he can show me what to do. I did contact him, asking him to ...
2019/03/19
[ "https://workplace.stackexchange.com/questions/131948", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101531/" ]
> > was I wrong in copying in the other directors in the email? > > > Yes, you were wrong. It's not clear what your goal was in copying others, but attempting to embarrass or undermine your boss is not a good career move. > > Maybe I should have sent it directly to him first. > > > Not maybe. You clearly ...
It is not the best thing to do (actually, it was quite bad), but it is not a career-ending mistake provided you learn from this mistake and not make it a habit. In these kinds of situations (i.e. something not working), you should: * ask verbally (your colleagues or your boss) to whom you should report the problem i...
131,948
I am a new (3 months) software developer in a smallish software company (10 people). I've been given a new project which has complex and poorly documented requirements, and I've been asked to speak to my boss (who is a company director) before I begin work so he can show me what to do. I did contact him, asking him to ...
2019/03/19
[ "https://workplace.stackexchange.com/questions/131948", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101531/" ]
It's so easy to parse the world in terms of justice—I have done so many times, myself. And if we are parsing the world that way, when someone does something that we perceive affects us negatively, it feels like an injustice. Suddenly a part of our brain says we have the high moral ground. Suddenly we feel like actions ...
I disagree with the other answers here. You absolutely did the right thing. The history you recounted demonstrated a clear pattern of behavior of ignoring your issues - promised meetings that don't take place, phone calls that aren't returned, etc. And if you'd followed the advice here, there would have been no consequ...
131,948
I am a new (3 months) software developer in a smallish software company (10 people). I've been given a new project which has complex and poorly documented requirements, and I've been asked to speak to my boss (who is a company director) before I begin work so he can show me what to do. I did contact him, asking him to ...
2019/03/19
[ "https://workplace.stackexchange.com/questions/131948", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101531/" ]
Your frustration level is pretty high right now, and it definitely came out in that email. You should probably seriously consider if working in a small company on projects with complex and poorly documented requirements while learning new technology is something you should be doing. Some people thrive on that kind of n...
It's so easy to parse the world in terms of justice—I have done so many times, myself. And if we are parsing the world that way, when someone does something that we perceive affects us negatively, it feels like an injustice. Suddenly a part of our brain says we have the high moral ground. Suddenly we feel like actions ...
131,948
I am a new (3 months) software developer in a smallish software company (10 people). I've been given a new project which has complex and poorly documented requirements, and I've been asked to speak to my boss (who is a company director) before I begin work so he can show me what to do. I did contact him, asking him to ...
2019/03/19
[ "https://workplace.stackexchange.com/questions/131948", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101531/" ]
> > was I wrong in copying in the other directors in the email? > > > **yes**.. I understand that you were likely frustrated but CC-ing others in to what is basically a rant at your boss is unwise. It absolutely comes across as you wanting to air your grievance and annoyance with him in front of others and as an ...
I disagree with the other answers here. You absolutely did the right thing. The history you recounted demonstrated a clear pattern of behavior of ignoring your issues - promised meetings that don't take place, phone calls that aren't returned, etc. And if you'd followed the advice here, there would have been no consequ...
131,948
I am a new (3 months) software developer in a smallish software company (10 people). I've been given a new project which has complex and poorly documented requirements, and I've been asked to speak to my boss (who is a company director) before I begin work so he can show me what to do. I did contact him, asking him to ...
2019/03/19
[ "https://workplace.stackexchange.com/questions/131948", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101531/" ]
> > was I wrong in copying in the other directors in the email? > > > Yes, you were wrong. It's not clear what your goal was in copying others, but attempting to embarrass or undermine your boss is not a good career move. > > Maybe I should have sent it directly to him first. > > > Not maybe. You clearly ...
**Yes, you were definitely wrong to CC this e-mail.** There are several problems here. Let's take a look: > > Hi X I can't log in to Visual Studio again, so I can't do my job. > > > This may be true, or it may not. There are other editors you could use, such as the free Visual Studio Code, especially if you're pr...
69,653,414
I’m using axon framework with spring boot version ``` compile("org.axonframework:axon-spring-boot-starter:4.3.3") { exclude group: 'org.axonframework', module: 'axon-server-connector' } ``` Recently I’ve started noticing certain business workflows halting suddenly and when I checked the logs I found this excepti...
2021/10/20
[ "https://Stackoverflow.com/questions/69653414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9499019/" ]
One of the approaches is to store item names in an array or object and then check if the particular item were selected. Here is another approach you could use: ``` const HomeScreen = () => { const itemsData = [ { name: 'Eggs', image: 'image require here', isSelected: false }, { name: 'Pasta', imag...
There are 2 options depending on your needs. 1. You could keep your all of your data and selected state in a single stateful array. On press you need to find the item in the array that should update. ``` import * as React from 'react'; import { Text, StyleSheet, TouchableOpacity, Butto...
73,875,239
I am building my first react-native app for both android and IOS. In order for my app to function, I need to use RNPickerSelect. But for some reason when I try to do ``` <RNPickerSelect onValueChange={(value) => setOrgin(value)} value={orgin} useNativeAndroidPickerStyle={fals...
2022/09/28
[ "https://Stackoverflow.com/questions/73875239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19598817/" ]
``` mysql> show create table mytable; CREATE TABLE `mytable` ( `Owner ID` int DEFAULT NULL, `Contractor ID` int DEFAULT NULL, `Phone Number` varchar(20) DEFAULT NULL ) mysql> select concat('alter table `', table_schema, '`.`', table_name, '` rename column `', column_name, '` to `', replace(column_name, ' ', '...
By using @Bill Karwin's answer, if you just want to test it in a specific table first, something like this will work: ``` select concat('alter table `mytable` rename column `', column_name, '` to `', replace(lower(column_name), ' ', '_'), '`;') as _sql from (select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME...
4,545,624
for my purposes of html parsing, I have implemented a PRODUCER/CONSUMER PATTERN. MY problem is the way in wich I can stop the consumer after that a producer have finished the task and a condivised buffer is emtpy . EXAMPLE: I have one PRODUCER and 5 CONSUMER. The producer stop to work because have complished its task...
2010/12/28
[ "https://Stackoverflow.com/questions/4545624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/530607/" ]
I'm not sure to understand. You could use the [Thread.IsAlive()](http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Thread.html#isAlive%28%29) method to know if your Producer Thread is still alive. Your `while` will look like this : ``` while(produttore.isAlive() || !queue.isempty()) ```
Try to approach the problem in a different way. Instead of a blocking queue, create an `Executor` (use the [helper methods in `Executors`](http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/Executors.html)). Then for each task, let the producer submit a task to the executor. Now you can simply wait ...
3,498,945
I need to implement authentication in a php app but using fingerprint as part of credentials. So, sincerely I'm kind of lost here. 1) Do I need a product (reader) with javascript SDK? I've seen some using ActiveX but obviously this will work just for IE. I would like a cross-browser solution here. 2) On server side...
2010/08/17
[ "https://Stackoverflow.com/questions/3498945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/347527/" ]
Jaison, "you cannot do it" and "PHP" don't belong in the same sentence. Berserkpi, you *can* do this in PHP, but only parts of it. I don't know about the hardware but I can generalize the parameters of your project. Fingerprinting is going to have to be done on some sort of client machine. That means a fingerprint-re...
You cannot do this using PHP - it's a scripting language. However, you can use .NET technologies like C# or VB for hardware porting. My idea: 1. Handle authentication using .NET technologies. 2. Pass the authentication result to PHP using ASP like embedding result in XML/JSON I don't know how much success rate you ...
3,498,945
I need to implement authentication in a php app but using fingerprint as part of credentials. So, sincerely I'm kind of lost here. 1) Do I need a product (reader) with javascript SDK? I've seen some using ActiveX but obviously this will work just for IE. I would like a cross-browser solution here. 2) On server side...
2010/08/17
[ "https://Stackoverflow.com/questions/3498945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/347527/" ]
we made a small app using c# to handle fingerprint scanning and converted the output to binary file. theoretically it shd be compared with wats available on the server and returns a result which determines if the user gets authenticated or not. another method is to use a windows app that works with the fingerprint har...
You cannot do this using PHP - it's a scripting language. However, you can use .NET technologies like C# or VB for hardware porting. My idea: 1. Handle authentication using .NET technologies. 2. Pass the authentication result to PHP using ASP like embedding result in XML/JSON I don't know how much success rate you ...
3,498,945
I need to implement authentication in a php app but using fingerprint as part of credentials. So, sincerely I'm kind of lost here. 1) Do I need a product (reader) with javascript SDK? I've seen some using ActiveX but obviously this will work just for IE. I would like a cross-browser solution here. 2) On server side...
2010/08/17
[ "https://Stackoverflow.com/questions/3498945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/347527/" ]
i have came across a library, [php\_zklib](https://github.com/dnaextrim/php_zklib) it does seem to work with biometric devices. But Problem is there is no documentation of it over the internet.. I have seen someone Using Fingerprint device for attendance using this library.
You cannot do this using PHP - it's a scripting language. However, you can use .NET technologies like C# or VB for hardware porting. My idea: 1. Handle authentication using .NET technologies. 2. Pass the authentication result to PHP using ASP like embedding result in XML/JSON I don't know how much success rate you ...
3,498,945
I need to implement authentication in a php app but using fingerprint as part of credentials. So, sincerely I'm kind of lost here. 1) Do I need a product (reader) with javascript SDK? I've seen some using ActiveX but obviously this will work just for IE. I would like a cross-browser solution here. 2) On server side...
2010/08/17
[ "https://Stackoverflow.com/questions/3498945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/347527/" ]
Look at here. They have Java, PHP, web app aupported SDK and hardware for biometric authentication. <http://www.m2sys.com/bioplugin/>
You cannot do this using PHP - it's a scripting language. However, you can use .NET technologies like C# or VB for hardware porting. My idea: 1. Handle authentication using .NET technologies. 2. Pass the authentication result to PHP using ASP like embedding result in XML/JSON I don't know how much success rate you ...
3,498,945
I need to implement authentication in a php app but using fingerprint as part of credentials. So, sincerely I'm kind of lost here. 1) Do I need a product (reader) with javascript SDK? I've seen some using ActiveX but obviously this will work just for IE. I would like a cross-browser solution here. 2) On server side...
2010/08/17
[ "https://Stackoverflow.com/questions/3498945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/347527/" ]
Jaison, "you cannot do it" and "PHP" don't belong in the same sentence. Berserkpi, you *can* do this in PHP, but only parts of it. I don't know about the hardware but I can generalize the parameters of your project. Fingerprinting is going to have to be done on some sort of client machine. That means a fingerprint-re...
we made a small app using c# to handle fingerprint scanning and converted the output to binary file. theoretically it shd be compared with wats available on the server and returns a result which determines if the user gets authenticated or not. another method is to use a windows app that works with the fingerprint har...
3,498,945
I need to implement authentication in a php app but using fingerprint as part of credentials. So, sincerely I'm kind of lost here. 1) Do I need a product (reader) with javascript SDK? I've seen some using ActiveX but obviously this will work just for IE. I would like a cross-browser solution here. 2) On server side...
2010/08/17
[ "https://Stackoverflow.com/questions/3498945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/347527/" ]
Jaison, "you cannot do it" and "PHP" don't belong in the same sentence. Berserkpi, you *can* do this in PHP, but only parts of it. I don't know about the hardware but I can generalize the parameters of your project. Fingerprinting is going to have to be done on some sort of client machine. That means a fingerprint-re...
i have came across a library, [php\_zklib](https://github.com/dnaextrim/php_zklib) it does seem to work with biometric devices. But Problem is there is no documentation of it over the internet.. I have seen someone Using Fingerprint device for attendance using this library.
3,498,945
I need to implement authentication in a php app but using fingerprint as part of credentials. So, sincerely I'm kind of lost here. 1) Do I need a product (reader) with javascript SDK? I've seen some using ActiveX but obviously this will work just for IE. I would like a cross-browser solution here. 2) On server side...
2010/08/17
[ "https://Stackoverflow.com/questions/3498945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/347527/" ]
Jaison, "you cannot do it" and "PHP" don't belong in the same sentence. Berserkpi, you *can* do this in PHP, but only parts of it. I don't know about the hardware but I can generalize the parameters of your project. Fingerprinting is going to have to be done on some sort of client machine. That means a fingerprint-re...
Look at here. They have Java, PHP, web app aupported SDK and hardware for biometric authentication. <http://www.m2sys.com/bioplugin/>
64,716
> > Drax: You, Quill, are my friend. This dumb tree is my friend. And this green whore is now my... > > > Gamora: You must stop! > > > Drax's statement seems incongruous with reality and his character. * There isn't so much as single kiss in the entire movie, including involving Gamora. * Drax's speech is preci...
2014/08/03
[ "https://scifi.stackexchange.com/questions/64716", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/24067/" ]
### Because the prisoners were calling Gamora a "green whore" when she first entered the prison yard, and Drax is incredibly literal. He has no clue they were using it as an insult; he thinks that's what she actually was. * The problem is if you weren't really listening it was easy to miss,there was a lot going on in ...
> > Whore, noun: > > > [Definition of WHORE](http://www.merriam-webster.com/dictionary/whore) > > > 1 : A woman who engages in sexual acts for money : prostitute ; also : a promiscuous or immoral woman > > 2 : A male who engages in sexual acts for money > > 3 : A venal or unscrupulous person > > Merriam-W...
9,240,471
What it says above. Unsurprisingly, I couldn't find a clear answer to this. I just want to know if calling it more than once in a script will cause a problem.
2012/02/11
[ "https://Stackoverflow.com/questions/9240471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471436/" ]
Quoting [**the manual**](http://fr2.php.net/session_start) : > > As of PHP 4.3.3, calling `session_start()` after the session was > previously started will result in an error of level `E_NOTICE`. > > Also, the second session start will simply be ignored. > > > So, it will not do much -- except raise a notice...
No, `session_start` is not idempotent, it has dependencies in the runtime state of the language. You can normally call it more than once which could give you some warnings or errors without much of a difference, however, if you change the session state and/or configuration between calls, the function won't behave the ...
9,240,471
What it says above. Unsurprisingly, I couldn't find a clear answer to this. I just want to know if calling it more than once in a script will cause a problem.
2012/02/11
[ "https://Stackoverflow.com/questions/9240471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471436/" ]
Quoting [**the manual**](http://fr2.php.net/session_start) : > > As of PHP 4.3.3, calling `session_start()` after the session was > previously started will result in an error of level `E_NOTICE`. > > Also, the second session start will simply be ignored. > > > So, it will not do much -- except raise a notice...
It will cause an error (session already started). But if you ignore the error, it would be idempotent. In PHP 5.4, we'll get: <http://nl3.php.net/manual/en/function.session-status.php>
20,444,748
I work on branch, let name it `mybranch`. I do not modify `master`. I want to push changes on `origin/feature/mybranch` but I have some problems. What is strange I've done it before a few times and I didn't have any problems. ``` $ git branch develop * feature/mybranch master $ git push To http://...... ! [rejected] ...
2013/12/07
[ "https://Stackoverflow.com/questions/20444748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/585773/" ]
1. Your first `git push` failed because your `master` is behind `origin/master`, so it cannot be pushed safely. The error message explained this. 2. Then after `git checkout master` the `git pull` didn't work because you had pending changes that would conflict with the incoming changes from `origin/master`. You must ha...
Seems like you have a conflict in one of the files you changed. Just add them and commit, after that you will be able to pull. It's also possible that after pull you will have to resolve a conflict and then commit again. I hope it helps!
20,444,748
I work on branch, let name it `mybranch`. I do not modify `master`. I want to push changes on `origin/feature/mybranch` but I have some problems. What is strange I've done it before a few times and I didn't have any problems. ``` $ git branch develop * feature/mybranch master $ git push To http://...... ! [rejected] ...
2013/12/07
[ "https://Stackoverflow.com/questions/20444748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/585773/" ]
check your master ``` git diff ``` if there no changes, still you get a same problem check for un tracked files add files and stash taht files after that pull your original master and try to push again
Seems like you have a conflict in one of the files you changed. Just add them and commit, after that you will be able to pull. It's also possible that after pull you will have to resolve a conflict and then commit again. I hope it helps!
20,444,748
I work on branch, let name it `mybranch`. I do not modify `master`. I want to push changes on `origin/feature/mybranch` but I have some problems. What is strange I've done it before a few times and I didn't have any problems. ``` $ git branch develop * feature/mybranch master $ git push To http://...... ! [rejected] ...
2013/12/07
[ "https://Stackoverflow.com/questions/20444748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/585773/" ]
Part 1: Getting your push done without worrying about `master` -------------------------------------------------------------- (Note: actually, it's already done. See note towards the bottom of part 1.) You're running `git push` with no additional arguments. If you run `git push` with two more arguments, they specify...
Seems like you have a conflict in one of the files you changed. Just add them and commit, after that you will be able to pull. It's also possible that after pull you will have to resolve a conflict and then commit again. I hope it helps!
20,444,748
I work on branch, let name it `mybranch`. I do not modify `master`. I want to push changes on `origin/feature/mybranch` but I have some problems. What is strange I've done it before a few times and I didn't have any problems. ``` $ git branch develop * feature/mybranch master $ git push To http://...... ! [rejected] ...
2013/12/07
[ "https://Stackoverflow.com/questions/20444748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/585773/" ]
Part 1: Getting your push done without worrying about `master` -------------------------------------------------------------- (Note: actually, it's already done. See note towards the bottom of part 1.) You're running `git push` with no additional arguments. If you run `git push` with two more arguments, they specify...
1. Your first `git push` failed because your `master` is behind `origin/master`, so it cannot be pushed safely. The error message explained this. 2. Then after `git checkout master` the `git pull` didn't work because you had pending changes that would conflict with the incoming changes from `origin/master`. You must ha...
20,444,748
I work on branch, let name it `mybranch`. I do not modify `master`. I want to push changes on `origin/feature/mybranch` but I have some problems. What is strange I've done it before a few times and I didn't have any problems. ``` $ git branch develop * feature/mybranch master $ git push To http://...... ! [rejected] ...
2013/12/07
[ "https://Stackoverflow.com/questions/20444748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/585773/" ]
Part 1: Getting your push done without worrying about `master` -------------------------------------------------------------- (Note: actually, it's already done. See note towards the bottom of part 1.) You're running `git push` with no additional arguments. If you run `git push` with two more arguments, they specify...
check your master ``` git diff ``` if there no changes, still you get a same problem check for un tracked files add files and stash taht files after that pull your original master and try to push again
9,045,769
I am trying to make an addon to a game named Tibia. On their website Tibia.com you can search up people and see their deaths. forexample: <http://www.tibia.com/community/?subtopic=characters&name=Kixus> Now I want to read the deaths data by using Regex in my C# application. But I cannot seem to work it out, I've b...
2012/01/28
[ "https://Stackoverflow.com/questions/9045769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175245/" ]
It's a bad idea to use regular expressions to parse HTML. They're a very poor tool for the job. If you're parsing HTML, use an HTML parser. For .NET, the usual recommendation is to use the [HTML Agility Pack](http://htmlagilitypack.codeplex.com/).
try this : <http://jsbin.com/atupok/edit#javascript,html> and continue from there .... I did the most job here :) edit <http://jsbin.com/atupok/3/edit> and start using this tool <http://regexr.com?2vrmf> not the one you have.
9,045,769
I am trying to make an addon to a game named Tibia. On their website Tibia.com you can search up people and see their deaths. forexample: <http://www.tibia.com/community/?subtopic=characters&name=Kixus> Now I want to read the deaths data by using Regex in my C# application. But I cannot seem to work it out, I've b...
2012/01/28
[ "https://Stackoverflow.com/questions/9045769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175245/" ]
As suggested by Joe White, you would have a much more robust implementation if you use an HTML parser for this task. There is plenty of support for this on StackOverflow: see [here](https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454) for example. **If you...
try this : <http://jsbin.com/atupok/edit#javascript,html> and continue from there .... I did the most job here :) edit <http://jsbin.com/atupok/3/edit> and start using this tool <http://regexr.com?2vrmf> not the one you have.
9,045,769
I am trying to make an addon to a game named Tibia. On their website Tibia.com you can search up people and see their deaths. forexample: <http://www.tibia.com/community/?subtopic=characters&name=Kixus> Now I want to read the deaths data by using Regex in my C# application. But I cannot seem to work it out, I've b...
2012/01/28
[ "https://Stackoverflow.com/questions/9045769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175245/" ]
It's a bad idea to use regular expressions to parse HTML. They're a very poor tool for the job. If you're parsing HTML, use an HTML parser. For .NET, the usual recommendation is to use the [HTML Agility Pack](http://htmlagilitypack.codeplex.com/).
You can also use [Espresso](http://www.ultrapico.com/ExpressoDownload.htm) tool to work out proper regular expression. To properly escape all special characters that are not parts of regular expression you can use [Regex.Escape](http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.escape.aspx) ...
9,045,769
I am trying to make an addon to a game named Tibia. On their website Tibia.com you can search up people and see their deaths. forexample: <http://www.tibia.com/community/?subtopic=characters&name=Kixus> Now I want to read the deaths data by using Regex in my C# application. But I cannot seem to work it out, I've b...
2012/01/28
[ "https://Stackoverflow.com/questions/9045769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175245/" ]
As suggested by Joe White, you would have a much more robust implementation if you use an HTML parser for this task. There is plenty of support for this on StackOverflow: see [here](https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454) for example. **If you...
You can also use [Espresso](http://www.ultrapico.com/ExpressoDownload.htm) tool to work out proper regular expression. To properly escape all special characters that are not parts of regular expression you can use [Regex.Escape](http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.escape.aspx) ...
9,045,769
I am trying to make an addon to a game named Tibia. On their website Tibia.com you can search up people and see their deaths. forexample: <http://www.tibia.com/community/?subtopic=characters&name=Kixus> Now I want to read the deaths data by using Regex in my C# application. But I cannot seem to work it out, I've b...
2012/01/28
[ "https://Stackoverflow.com/questions/9045769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175245/" ]
It's a bad idea to use regular expressions to parse HTML. They're a very poor tool for the job. If you're parsing HTML, use an HTML parser. For .NET, the usual recommendation is to use the [HTML Agility Pack](http://htmlagilitypack.codeplex.com/).
As suggested by Joe White, you would have a much more robust implementation if you use an HTML parser for this task. There is plenty of support for this on StackOverflow: see [here](https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454) for example. **If you...