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
24,724,575
I know that I can run non GUI jar files from the command line. Is there any way that can do so by clicking or something and not writing the commands again and again.? Is there any software to do so. ( I am talking about a compiled jar and don't want to run from any ide)
2014/07/13
[ "https://Stackoverflow.com/questions/24724575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3809115/" ]
``` public static final String TITLE = "CONSOLE title"; public static final String FILENAME = "myjar.jar"; public static void main(String[] args) throws InterruptedException, IOException { if(args.length==0 || !args[args.length-1].equals("terminal")) { String[] command; if(System.getProperty("os.nam...
The way intended by Java is that you call `java -jar XXXX.jar` on the jars you need. Drawback is that you can't specify a classpath so all classes should be there. A cooler way to package an application is by using Java WebStart. With that the user installs the application jut by clicking on a web browser. Check here ...
659,976
I'm sort of new to all this, and am not quite sure what I did. I somehow managed to delete the boot menu from my computer, so when it starts it automatically goes into Ubuntu. I got the boot menu back using boot-repair, but now Windows 7 isn't showing up as an option in the menu. Can anyone explain how to fix this and ...
2015/08/11
[ "https://askubuntu.com/questions/659976", "https://askubuntu.com", "https://askubuntu.com/users/438404/" ]
That's extremely easy if you use the following set-up: 1. Use your existing bootable USB stick to install Ubuntu on an [SLC USB stick](https://en.wikipedia.org/wiki/Single-level_cell#Single-level_cell) (USB 3.0 preferred if your hardware supports it) Just a normal install, *treating the USB stick as an SSD.* **Why?**...
1. if you created a boot usb everything will be deleted after shut down... there is one program for windows <http://www.linuxliveusb.com/> that i use on other peoples computer if i do not have a live usb on hand. 2. if you boot from a CD for example and then install Ubuntu on the usb then files will be saved please rem...
659,976
I'm sort of new to all this, and am not quite sure what I did. I somehow managed to delete the boot menu from my computer, so when it starts it automatically goes into Ubuntu. I got the boot menu back using boot-repair, but now Windows 7 isn't showing up as an option in the menu. Can anyone explain how to fix this and ...
2015/08/11
[ "https://askubuntu.com/questions/659976", "https://askubuntu.com", "https://askubuntu.com/users/438404/" ]
That's extremely easy if you use the following set-up: 1. Use your existing bootable USB stick to install Ubuntu on an [SLC USB stick](https://en.wikipedia.org/wiki/Single-level_cell#Single-level_cell) (USB 3.0 preferred if your hardware supports it) Just a normal install, *treating the USB stick as an SSD.* **Why?**...
If you burn a live Linux image to the USB drive, it will be booted read-only and therefore changes will only be stored in RAM. If you're not prepared to give up hard drive space to Ubuntu, you can burn the ISO to a second flash drive (even 2 GB is enough), boot it and install it to the 32 GB drive. I did that when 14.1...
320,845
I have a grid from research tools saved as shapefile. I want to display the center coordinate of each grid square in the attribute table.
2019/04/25
[ "https://gis.stackexchange.com/questions/320845", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/142028/" ]
EDIT: I first thought that your squares were polygons. If they are lines, you need to convert the lines to polygons (vector > geometry tools > Lines to polygon) , then you can apply the method below (for polygons) In the attribute table, you can compute the X and Y coordinates of the centroid (=the point at the center...
I polygonized the grid, then used centroid. Strangely lines to polygon did not work, but polygonize did.
70,525,148
I have the following dataframes: df1: ``` Animal Farm Year y 1 A 1 23 2 A 2 24 3 B 1 13 4 B 3 28 5 C 1 25 ``` df2 ``` Farm Year Month C Mm Pp A 1 1 23 15 4 A 1 2 25 18 5 A 1 3 13 35 7 A ...
2021/12/29
[ "https://Stackoverflow.com/questions/70525148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1864535/" ]
Use the `stderr=subprocess.PIPE` argument so you can examine the error output. ``` import subprocess r = subprocess.run(['bash', '/some/nonexistent/path.sh'], stderr=subprocess.PIPE) if r.returncode: if b'No such file or directory' in r.stderr: print('That file was not found.') ```
I could not catch the `bash` exception in your code, as it is written. But you can try the following code, even if it's longer. You can also send a tuple of commands, instead of one command at a time: > > **NOTE** - Tested on Ubuntu 20.04, using Python 3.8 > > > ``` commands = ("bash start.sh", "date",) for c in ...
71,856
Here you can download the logo <https://www.blender.org/about/logo/>, but the text is not editable. What font is? It's a free font, right?
2017/01/20
[ "https://blender.stackexchange.com/questions/71856", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/34853/" ]
Light code gets promising results already. I made an example with rigid body meshes instead of particles. Spherical particle will be easy to detect as well since a collision is defined by their distance. A rigid body simulation. [![enter image description here](https://i.stack.imgur.com/NXTz1.gif)](https://i.stack....
And what about changing the particles color of your two particles systems as soon as they are : - below a given z value ; - or inside a given coordinates system ? I'm an artist, so I have no any idea of how to do this, and if such thing is only possible, but if this can help you even a little.
71,856
Here you can download the logo <https://www.blender.org/about/logo/>, but the text is not editable. What font is? It's a free font, right?
2017/01/20
[ "https://blender.stackexchange.com/questions/71856", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/34853/" ]
Using Animation Nodes ===================== Updated for Animation Nodes 2.0! ***Method with the* [Molecular Modifier](http://pyroevil.com/molecular-script-download/) *and* [CubeSurfer](http://pyroevil.com/cubesurfer-addon-download/) *below!!!*** Another way to do this is using [@Jacques Lucke](https://blender.stacke...
And what about changing the particles color of your two particles systems as soon as they are : - below a given z value ; - or inside a given coordinates system ? I'm an artist, so I have no any idea of how to do this, and if such thing is only possible, but if this can help you even a little.
71,856
Here you can download the logo <https://www.blender.org/about/logo/>, but the text is not editable. What font is? It's a free font, right?
2017/01/20
[ "https://blender.stackexchange.com/questions/71856", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/34853/" ]
Using Animation Nodes ===================== Updated for Animation Nodes 2.0! ***Method with the* [Molecular Modifier](http://pyroevil.com/molecular-script-download/) *and* [CubeSurfer](http://pyroevil.com/cubesurfer-addon-download/) *below!!!*** Another way to do this is using [@Jacques Lucke](https://blender.stacke...
Light code gets promising results already. I made an example with rigid body meshes instead of particles. Spherical particle will be easy to detect as well since a collision is defined by their distance. A rigid body simulation. [![enter image description here](https://i.stack.imgur.com/NXTz1.gif)](https://i.stack....
71,856
Here you can download the logo <https://www.blender.org/about/logo/>, but the text is not editable. What font is? It's a free font, right?
2017/01/20
[ "https://blender.stackexchange.com/questions/71856", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/34853/" ]
Light code gets promising results already. I made an example with rigid body meshes instead of particles. Spherical particle will be easy to detect as well since a collision is defined by their distance. A rigid body simulation. [![enter image description here](https://i.stack.imgur.com/NXTz1.gif)](https://i.stack....
The easiest solution might be using UPBGE: Use this node setup: [![enter image description here](https://i.stack.imgur.com/smiM7.png)](https://i.stack.imgur.com/smiM7.png) and you get: [![enter image description here](https://i.stack.imgur.com/Zk8vW.gif)](https://i.stack.imgur.com/Zk8vW.gif) [![](https://blend-exc...
71,856
Here you can download the logo <https://www.blender.org/about/logo/>, but the text is not editable. What font is? It's a free font, right?
2017/01/20
[ "https://blender.stackexchange.com/questions/71856", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/34853/" ]
Using Animation Nodes ===================== Updated for Animation Nodes 2.0! ***Method with the* [Molecular Modifier](http://pyroevil.com/molecular-script-download/) *and* [CubeSurfer](http://pyroevil.com/cubesurfer-addon-download/) *below!!!*** Another way to do this is using [@Jacques Lucke](https://blender.stacke...
The easiest solution might be using UPBGE: Use this node setup: [![enter image description here](https://i.stack.imgur.com/smiM7.png)](https://i.stack.imgur.com/smiM7.png) and you get: [![enter image description here](https://i.stack.imgur.com/Zk8vW.gif)](https://i.stack.imgur.com/Zk8vW.gif) [![](https://blend-exc...
16,151,528
I am installing gitolite on a CentOS 5.9 server. I have created the git user, then after `su - git` I have managed to get my public key into the ~/.ssh/ directory, I have successfully cloned the gitolite repo from github and have run `gitolite/install -ln`. Next step is to run gitolite setup. ``` git@hostname [~]# gi...
2013/04/22
[ "https://Stackoverflow.com/questions/16151528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283991/" ]
if you are taking the pub key from puttykeygen etc.. it will be in multi line with headers like ``` ---- BEGIN SSH2 PUBLIC KEY ---- Comment: "test@example.com" startofkeylines .... endofkey== ---- END SSH2 PUBLIC KEY ---- ``` Remove the --- begin and end lines, and the Comment: line. Make all the key lines in one li...
I have tried all the key regeneration, gitolite reinstalation, clearing all key files, etc, all without success, untill I started looking at Git history for gitolite. The problem was that master branch on the github & google.code repos was broken. I checked out last stable version v3.6.4 at the finger print problem di...
16,151,528
I am installing gitolite on a CentOS 5.9 server. I have created the git user, then after `su - git` I have managed to get my public key into the ~/.ssh/ directory, I have successfully cloned the gitolite repo from github and have run `gitolite/install -ln`. Next step is to run gitolite setup. ``` git@hostname [~]# gi...
2013/04/22
[ "https://Stackoverflow.com/questions/16151528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283991/" ]
if you are taking the pub key from puttykeygen etc.. it will be in multi line with headers like ``` ---- BEGIN SSH2 PUBLIC KEY ---- Comment: "test@example.com" startofkeylines .... endofkey== ---- END SSH2 PUBLIC KEY ---- ``` Remove the --- begin and end lines, and the Comment: line. Make all the key lines in one li...
I upgraded gitolite from v2 to v3, runs install and setup the admin key then force push the config repository, all issues are now fixed.
16,151,528
I am installing gitolite on a CentOS 5.9 server. I have created the git user, then after `su - git` I have managed to get my public key into the ~/.ssh/ directory, I have successfully cloned the gitolite repo from github and have run `gitolite/install -ln`. Next step is to run gitolite setup. ``` git@hostname [~]# gi...
2013/04/22
[ "https://Stackoverflow.com/questions/16151528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283991/" ]
The issue I encountered was that openssh, in or around version v6.8 changed the default cipher for a fingerprint (ssh-keygen -lf path-to-key) so one must now explicitly pass the cipher type (-E md5) to get the legacy behavior. Reviewing the CHANGES file reveals that v3.6.5 of gitolite will 'handle new style ssh fingerp...
For me, I got it working by **not** running the `gitolite` command as the `root` user. I created a `git` user account (and found out that it needs to be an account that can be logged into ... that is, no `/bin/false` in `/etc/passwd`).
16,151,528
I am installing gitolite on a CentOS 5.9 server. I have created the git user, then after `su - git` I have managed to get my public key into the ~/.ssh/ directory, I have successfully cloned the gitolite repo from github and have run `gitolite/install -ln`. Next step is to run gitolite setup. ``` git@hostname [~]# gi...
2013/04/22
[ "https://Stackoverflow.com/questions/16151528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283991/" ]
You wrote, "It turns out gitolite was retaining the public keys I had tried to set up with previously that had failed." I had the same problem. I was getting the error: *FATAL: fingerprinting failed for 'keydir/jsmith.pub'* I deleted the failing key on the client side, and did a git push, but still the same issue. T...
For me, I got it working by **not** running the `gitolite` command as the `root` user. I created a `git` user account (and found out that it needs to be an account that can be logged into ... that is, no `/bin/false` in `/etc/passwd`).
16,151,528
I am installing gitolite on a CentOS 5.9 server. I have created the git user, then after `su - git` I have managed to get my public key into the ~/.ssh/ directory, I have successfully cloned the gitolite repo from github and have run `gitolite/install -ln`. Next step is to run gitolite setup. ``` git@hostname [~]# gi...
2013/04/22
[ "https://Stackoverflow.com/questions/16151528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283991/" ]
if you are taking the pub key from puttykeygen etc.. it will be in multi line with headers like ``` ---- BEGIN SSH2 PUBLIC KEY ---- Comment: "test@example.com" startofkeylines .... endofkey== ---- END SSH2 PUBLIC KEY ---- ``` Remove the --- begin and end lines, and the Comment: line. Make all the key lines in one li...
gitolite is fingerprinting all keys in the .ssh directory - including the authorized\_keys file. Remove any unneeded or corrupt keys from the .ssh directory and the authorized\_keys file.
16,151,528
I am installing gitolite on a CentOS 5.9 server. I have created the git user, then after `su - git` I have managed to get my public key into the ~/.ssh/ directory, I have successfully cloned the gitolite repo from github and have run `gitolite/install -ln`. Next step is to run gitolite setup. ``` git@hostname [~]# gi...
2013/04/22
[ "https://Stackoverflow.com/questions/16151528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283991/" ]
gitolite is fingerprinting all keys in the .ssh directory - including the authorized\_keys file. Remove any unneeded or corrupt keys from the .ssh directory and the authorized\_keys file.
I upgraded gitolite from v2 to v3, runs install and setup the admin key then force push the config repository, all issues are now fixed.
16,151,528
I am installing gitolite on a CentOS 5.9 server. I have created the git user, then after `su - git` I have managed to get my public key into the ~/.ssh/ directory, I have successfully cloned the gitolite repo from github and have run `gitolite/install -ln`. Next step is to run gitolite setup. ``` git@hostname [~]# gi...
2013/04/22
[ "https://Stackoverflow.com/questions/16151528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283991/" ]
As I [mentioned before](https://stackoverflow.com/a/10744027/6309), that means the ssh key hasn't been properly generated. Try: ``` ssh-keygen -t rsa -f "${H}/.ssh/micha" -C "Gitolite Admin access (not interactive)" -q -P "" ``` --- The [OP mwotton](https://stackoverflow.com/users/283991/mwotton) [reports](https:/...
For me, I got it working by **not** running the `gitolite` command as the `root` user. I created a `git` user account (and found out that it needs to be an account that can be logged into ... that is, no `/bin/false` in `/etc/passwd`).
16,151,528
I am installing gitolite on a CentOS 5.9 server. I have created the git user, then after `su - git` I have managed to get my public key into the ~/.ssh/ directory, I have successfully cloned the gitolite repo from github and have run `gitolite/install -ln`. Next step is to run gitolite setup. ``` git@hostname [~]# gi...
2013/04/22
[ "https://Stackoverflow.com/questions/16151528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283991/" ]
You wrote, "It turns out gitolite was retaining the public keys I had tried to set up with previously that had failed." I had the same problem. I was getting the error: *FATAL: fingerprinting failed for 'keydir/jsmith.pub'* I deleted the failing key on the client side, and did a git push, but still the same issue. T...
I have tried all the key regeneration, gitolite reinstalation, clearing all key files, etc, all without success, untill I started looking at Git history for gitolite. The problem was that master branch on the github & google.code repos was broken. I checked out last stable version v3.6.4 at the finger print problem di...
16,151,528
I am installing gitolite on a CentOS 5.9 server. I have created the git user, then after `su - git` I have managed to get my public key into the ~/.ssh/ directory, I have successfully cloned the gitolite repo from github and have run `gitolite/install -ln`. Next step is to run gitolite setup. ``` git@hostname [~]# gi...
2013/04/22
[ "https://Stackoverflow.com/questions/16151528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283991/" ]
I ran into the same problem. Turned out that during copy-paste I included a newline into one of my keys. Took me some time to spot it...
The issue I encountered was that openssh, in or around version v6.8 changed the default cipher for a fingerprint (ssh-keygen -lf path-to-key) so one must now explicitly pass the cipher type (-E md5) to get the legacy behavior. Reviewing the CHANGES file reveals that v3.6.5 of gitolite will 'handle new style ssh fingerp...
16,151,528
I am installing gitolite on a CentOS 5.9 server. I have created the git user, then after `su - git` I have managed to get my public key into the ~/.ssh/ directory, I have successfully cloned the gitolite repo from github and have run `gitolite/install -ln`. Next step is to run gitolite setup. ``` git@hostname [~]# gi...
2013/04/22
[ "https://Stackoverflow.com/questions/16151528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283991/" ]
As I [mentioned before](https://stackoverflow.com/a/10744027/6309), that means the ssh key hasn't been properly generated. Try: ``` ssh-keygen -t rsa -f "${H}/.ssh/micha" -C "Gitolite Admin access (not interactive)" -q -P "" ``` --- The [OP mwotton](https://stackoverflow.com/users/283991/mwotton) [reports](https:/...
I have tried all the key regeneration, gitolite reinstalation, clearing all key files, etc, all without success, untill I started looking at Git history for gitolite. The problem was that master branch on the github & google.code repos was broken. I checked out last stable version v3.6.4 at the finger print problem di...
48,116,449
I use the 3.2.1 version of the jquery.min.js I have this in my code: ``` $('#damage1').bind("DOMSubtreeModified",function(){displayIcons();}); ``` But this line causes an error in my console on Firefox: "Use of Mutation Events is deprecated. Use MutationObserver instead." Fair enough. In the documentation I see t...
2018/01/05
[ "https://Stackoverflow.com/questions/48116449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5990611/" ]
DOMSubtreeModified is now depreciated. Below code using MutationObserver should solve your issue. ``` $(function() { var observer = new MutationObserver(function(e) {displayIcons();}); observer.observe($('#damage1')[0], {characterData: true, childList: true}); }); ```
The DOMSubtreeModified has been deprecated. ``` // Select the node to observe for changes var targetNode = document.getElementById('#damage1'); // targetNode = document.querySelector('#myTable tbody'); // set which changes to observe var config = { attributes: true, childList: true, subtree: true }; //create cal...
10,389,126
My homework is to write function that get client to server delay estimation. I need to send from the client 50 request of "what is the time?" and than to receive 50 responses from the server ( by getTickCount()) - and than to calculate average. the problem is that for some reason the second recv function crashed and i...
2012/04/30
[ "https://Stackoverflow.com/questions/10389126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1006055/" ]
Have you tried switching to recvfrom? Since you are using sendto, its mirror function should make more sense. Also, if you send your 50 requests before processing a single receive, your delay will not be any good. Your average should be calculated on multiple single send/receive pairs
define two integers variables (start, end) add this code after handling error in the for loop of messages were sent from server ``` recvBuff[bytesRecv] = '\0'; //for handling null terminated to the answer if (i == 0) { start = atoi(recvBuff); } ...
748,725
I want to check multiple controls state in one method, in C# this would be accomplished like so: ``` if (((CheckBox)sender).Checked == true) { // Do something... } else { // Do something else... } ``` So how can I accomplish this in VB?
2009/04/14
[ "https://Stackoverflow.com/questions/748725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56555/" ]
C#: ``` (CheckBox)sender ``` VB: ``` CType(sender, CheckBox) ```
[Adam Robinson](https://stackoverflow.com/questions/748725/casting-in-visual-basic/748732#748732) is correct, also [`DirectCast`](http://msdn.microsoft.com/en-us/library/7k6y2h6x(VS.71).aspx) is available to you.
748,725
I want to check multiple controls state in one method, in C# this would be accomplished like so: ``` if (((CheckBox)sender).Checked == true) { // Do something... } else { // Do something else... } ``` So how can I accomplish this in VB?
2009/04/14
[ "https://Stackoverflow.com/questions/748725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56555/" ]
C#: ``` (CheckBox)sender ``` VB: ``` CType(sender, CheckBox) ```
VB actually has 2 notions of casting. 1. CLR style casting 2. Lexical Casting CLR style casting is what a C# user is more familiar with. This uses the CLR type system and conversions in order to perform the cast. VB has DirectCast and TryCast equivalent to the C# cast and as operator respectively. Lexical casts in ...
748,725
I want to check multiple controls state in one method, in C# this would be accomplished like so: ``` if (((CheckBox)sender).Checked == true) { // Do something... } else { // Do something else... } ``` So how can I accomplish this in VB?
2009/04/14
[ "https://Stackoverflow.com/questions/748725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56555/" ]
C#: ``` (CheckBox)sender ``` VB: ``` CType(sender, CheckBox) ```
DirectCast will perform the conversion at compile time but can only be used to cast reference types. Ctype will perform the conversion at run time (slower than converting at compile time) but is obviously useful for convertng value types. In your case "sender" is a reference type so DirectCast would be the way to go.
748,725
I want to check multiple controls state in one method, in C# this would be accomplished like so: ``` if (((CheckBox)sender).Checked == true) { // Do something... } else { // Do something else... } ``` So how can I accomplish this in VB?
2009/04/14
[ "https://Stackoverflow.com/questions/748725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56555/" ]
C#: ``` (CheckBox)sender ``` VB: ``` CType(sender, CheckBox) ```
Casting in VB.net uses the keyword `ctype`. So the C# statement `(CheckBox)sender` is equivalent to `ctype(sender,CheckBox)` in VB.net. Therefore your code in VB.net is: ``` if ctype(sender,CheckBox).Checked =True Then ' Do something... else ' Do something else... End If ```
748,725
I want to check multiple controls state in one method, in C# this would be accomplished like so: ``` if (((CheckBox)sender).Checked == true) { // Do something... } else { // Do something else... } ``` So how can I accomplish this in VB?
2009/04/14
[ "https://Stackoverflow.com/questions/748725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56555/" ]
VB actually has 2 notions of casting. 1. CLR style casting 2. Lexical Casting CLR style casting is what a C# user is more familiar with. This uses the CLR type system and conversions in order to perform the cast. VB has DirectCast and TryCast equivalent to the C# cast and as operator respectively. Lexical casts in ...
[Adam Robinson](https://stackoverflow.com/questions/748725/casting-in-visual-basic/748732#748732) is correct, also [`DirectCast`](http://msdn.microsoft.com/en-us/library/7k6y2h6x(VS.71).aspx) is available to you.
748,725
I want to check multiple controls state in one method, in C# this would be accomplished like so: ``` if (((CheckBox)sender).Checked == true) { // Do something... } else { // Do something else... } ``` So how can I accomplish this in VB?
2009/04/14
[ "https://Stackoverflow.com/questions/748725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56555/" ]
[Adam Robinson](https://stackoverflow.com/questions/748725/casting-in-visual-basic/748732#748732) is correct, also [`DirectCast`](http://msdn.microsoft.com/en-us/library/7k6y2h6x(VS.71).aspx) is available to you.
Casting in VB.net uses the keyword `ctype`. So the C# statement `(CheckBox)sender` is equivalent to `ctype(sender,CheckBox)` in VB.net. Therefore your code in VB.net is: ``` if ctype(sender,CheckBox).Checked =True Then ' Do something... else ' Do something else... End If ```
748,725
I want to check multiple controls state in one method, in C# this would be accomplished like so: ``` if (((CheckBox)sender).Checked == true) { // Do something... } else { // Do something else... } ``` So how can I accomplish this in VB?
2009/04/14
[ "https://Stackoverflow.com/questions/748725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56555/" ]
VB actually has 2 notions of casting. 1. CLR style casting 2. Lexical Casting CLR style casting is what a C# user is more familiar with. This uses the CLR type system and conversions in order to perform the cast. VB has DirectCast and TryCast equivalent to the C# cast and as operator respectively. Lexical casts in ...
DirectCast will perform the conversion at compile time but can only be used to cast reference types. Ctype will perform the conversion at run time (slower than converting at compile time) but is obviously useful for convertng value types. In your case "sender" is a reference type so DirectCast would be the way to go.
748,725
I want to check multiple controls state in one method, in C# this would be accomplished like so: ``` if (((CheckBox)sender).Checked == true) { // Do something... } else { // Do something else... } ``` So how can I accomplish this in VB?
2009/04/14
[ "https://Stackoverflow.com/questions/748725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56555/" ]
VB actually has 2 notions of casting. 1. CLR style casting 2. Lexical Casting CLR style casting is what a C# user is more familiar with. This uses the CLR type system and conversions in order to perform the cast. VB has DirectCast and TryCast equivalent to the C# cast and as operator respectively. Lexical casts in ...
Casting in VB.net uses the keyword `ctype`. So the C# statement `(CheckBox)sender` is equivalent to `ctype(sender,CheckBox)` in VB.net. Therefore your code in VB.net is: ``` if ctype(sender,CheckBox).Checked =True Then ' Do something... else ' Do something else... End If ```
748,725
I want to check multiple controls state in one method, in C# this would be accomplished like so: ``` if (((CheckBox)sender).Checked == true) { // Do something... } else { // Do something else... } ``` So how can I accomplish this in VB?
2009/04/14
[ "https://Stackoverflow.com/questions/748725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56555/" ]
DirectCast will perform the conversion at compile time but can only be used to cast reference types. Ctype will perform the conversion at run time (slower than converting at compile time) but is obviously useful for convertng value types. In your case "sender" is a reference type so DirectCast would be the way to go.
Casting in VB.net uses the keyword `ctype`. So the C# statement `(CheckBox)sender` is equivalent to `ctype(sender,CheckBox)` in VB.net. Therefore your code in VB.net is: ``` if ctype(sender,CheckBox).Checked =True Then ' Do something... else ' Do something else... End If ```
53,846,744
I am inserting data from table `tbl_login` to table `LoginHistory` with date stamp. But I am confused to add Date Stamp with query string. My Code is: ``` strSQL2 = "SELECT UserID, FirstName, LastName, UserName FROM tbl_login WHERE Username = """ & Me.txt_username.Value & """ AND Password = """ & Me.txt_password.Valu...
2018/12/19
[ "https://Stackoverflow.com/questions/53846744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7276729/" ]
For find window in OS Windows you can use `FindWindowEx` from the Win32 Api, for example: 1. Because this is original unsafe code you should import functions from user32.dll: ``` [DllImport("user32.dll", SetLastError = true)] static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszCla...
You can use the [Application.OpenForms](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.application.openforms?view=netframework-4.7.2) property.
50,095,637
We are developing microservices using java (Spring and Spring Boot), and the access to our Oracle DB is done via the JDBC Oracle Driver. The problem is that our DBAs can only see on the Oracle side that a "JDBC Thin Client" is connected. There is no better, logical representation of the connected application. Without ...
2018/04/30
[ "https://Stackoverflow.com/questions/50095637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3447647/" ]
The JDBC connection property "`oracle.jdbc.v$session.process`" can be set (as a system prop -D) to a value that uniquely identifies your microservice and that can then be retrieved in the V$SESSION view ("process" column).
Database users -------------- If you name the Database users used for connection like the Microservice, the DBA should be able to map the connections to the microservices. IP addresses ------------ For a Database a connection also contains an incomming IP address. Using a table of ip-addresses to microservices, the ...
50,095,637
We are developing microservices using java (Spring and Spring Boot), and the access to our Oracle DB is done via the JDBC Oracle Driver. The problem is that our DBAs can only see on the Oracle side that a "JDBC Thin Client" is connected. There is no better, logical representation of the connected application. Without ...
2018/04/30
[ "https://Stackoverflow.com/questions/50095637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3447647/" ]
Thank you everyone for your suggestions, I have tried them all and sadly they did not work. This is probably since I am connection using Spring Data and the default Hikari connection pool. After spending hours on it, the final solution was found here: [Spring Boot 1.3.5 with Hikari Connection Pool not able to set pro...
Database users -------------- If you name the Database users used for connection like the Microservice, the DBA should be able to map the connections to the microservices. IP addresses ------------ For a Database a connection also contains an incomming IP address. Using a table of ip-addresses to microservices, the ...
50,095,637
We are developing microservices using java (Spring and Spring Boot), and the access to our Oracle DB is done via the JDBC Oracle Driver. The problem is that our DBAs can only see on the Oracle side that a "JDBC Thin Client" is connected. There is no better, logical representation of the connected application. Without ...
2018/04/30
[ "https://Stackoverflow.com/questions/50095637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3447647/" ]
Database users -------------- If you name the Database users used for connection like the Microservice, the DBA should be able to map the connections to the microservices. IP addresses ------------ For a Database a connection also contains an incomming IP address. Using a table of ip-addresses to microservices, the ...
If you have access to the code that connects to the Oracle Database, you can try: ``` private static String getProcessId(final String fallback) { // Note: may fail in some JVM implementations // therefore fallback has to be provided // something like '<pid>@<hostname>', at least in SUN / Oracle JVMs final String j...
50,095,637
We are developing microservices using java (Spring and Spring Boot), and the access to our Oracle DB is done via the JDBC Oracle Driver. The problem is that our DBAs can only see on the Oracle side that a "JDBC Thin Client" is connected. There is no better, logical representation of the connected application. Without ...
2018/04/30
[ "https://Stackoverflow.com/questions/50095637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3447647/" ]
The JDBC connection property "`oracle.jdbc.v$session.process`" can be set (as a system prop -D) to a value that uniquely identifies your microservice and that can then be retrieved in the V$SESSION view ("process" column).
Depending on your Oracle version, the feature is implemented in the method [setEndToEndMetrics](https://docs.oracle.com/database/121/JAJDB/oracle/jdbc/OracleConnection.html#setEndToEndMetrics_java_lang_String____short_) (It has been deprecated since 12.1 in favor of setClientInfo()) or [setClientInfo](https://docs.ora...
50,095,637
We are developing microservices using java (Spring and Spring Boot), and the access to our Oracle DB is done via the JDBC Oracle Driver. The problem is that our DBAs can only see on the Oracle side that a "JDBC Thin Client" is connected. There is no better, logical representation of the connected application. Without ...
2018/04/30
[ "https://Stackoverflow.com/questions/50095637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3447647/" ]
Thank you everyone for your suggestions, I have tried them all and sadly they did not work. This is probably since I am connection using Spring Data and the default Hikari connection pool. After spending hours on it, the final solution was found here: [Spring Boot 1.3.5 with Hikari Connection Pool not able to set pro...
Depending on your Oracle version, the feature is implemented in the method [setEndToEndMetrics](https://docs.oracle.com/database/121/JAJDB/oracle/jdbc/OracleConnection.html#setEndToEndMetrics_java_lang_String____short_) (It has been deprecated since 12.1 in favor of setClientInfo()) or [setClientInfo](https://docs.ora...
50,095,637
We are developing microservices using java (Spring and Spring Boot), and the access to our Oracle DB is done via the JDBC Oracle Driver. The problem is that our DBAs can only see on the Oracle side that a "JDBC Thin Client" is connected. There is no better, logical representation of the connected application. Without ...
2018/04/30
[ "https://Stackoverflow.com/questions/50095637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3447647/" ]
Depending on your Oracle version, the feature is implemented in the method [setEndToEndMetrics](https://docs.oracle.com/database/121/JAJDB/oracle/jdbc/OracleConnection.html#setEndToEndMetrics_java_lang_String____short_) (It has been deprecated since 12.1 in favor of setClientInfo()) or [setClientInfo](https://docs.ora...
If you have access to the code that connects to the Oracle Database, you can try: ``` private static String getProcessId(final String fallback) { // Note: may fail in some JVM implementations // therefore fallback has to be provided // something like '<pid>@<hostname>', at least in SUN / Oracle JVMs final String j...
50,095,637
We are developing microservices using java (Spring and Spring Boot), and the access to our Oracle DB is done via the JDBC Oracle Driver. The problem is that our DBAs can only see on the Oracle side that a "JDBC Thin Client" is connected. There is no better, logical representation of the connected application. Without ...
2018/04/30
[ "https://Stackoverflow.com/questions/50095637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3447647/" ]
Thank you everyone for your suggestions, I have tried them all and sadly they did not work. This is probably since I am connection using Spring Data and the default Hikari connection pool. After spending hours on it, the final solution was found here: [Spring Boot 1.3.5 with Hikari Connection Pool not able to set pro...
The JDBC connection property "`oracle.jdbc.v$session.process`" can be set (as a system prop -D) to a value that uniquely identifies your microservice and that can then be retrieved in the V$SESSION view ("process" column).
50,095,637
We are developing microservices using java (Spring and Spring Boot), and the access to our Oracle DB is done via the JDBC Oracle Driver. The problem is that our DBAs can only see on the Oracle side that a "JDBC Thin Client" is connected. There is no better, logical representation of the connected application. Without ...
2018/04/30
[ "https://Stackoverflow.com/questions/50095637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3447647/" ]
The JDBC connection property "`oracle.jdbc.v$session.process`" can be set (as a system prop -D) to a value that uniquely identifies your microservice and that can then be retrieved in the V$SESSION view ("process" column).
If you have access to the code that connects to the Oracle Database, you can try: ``` private static String getProcessId(final String fallback) { // Note: may fail in some JVM implementations // therefore fallback has to be provided // something like '<pid>@<hostname>', at least in SUN / Oracle JVMs final String j...
50,095,637
We are developing microservices using java (Spring and Spring Boot), and the access to our Oracle DB is done via the JDBC Oracle Driver. The problem is that our DBAs can only see on the Oracle side that a "JDBC Thin Client" is connected. There is no better, logical representation of the connected application. Without ...
2018/04/30
[ "https://Stackoverflow.com/questions/50095637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3447647/" ]
Thank you everyone for your suggestions, I have tried them all and sadly they did not work. This is probably since I am connection using Spring Data and the default Hikari connection pool. After spending hours on it, the final solution was found here: [Spring Boot 1.3.5 with Hikari Connection Pool not able to set pro...
If you have access to the code that connects to the Oracle Database, you can try: ``` private static String getProcessId(final String fallback) { // Note: may fail in some JVM implementations // therefore fallback has to be provided // something like '<pid>@<hostname>', at least in SUN / Oracle JVMs final String j...
3,518,702
I have read a lot of articles on Big O notation but never found a problem like this and I have no idea how to solve it. $$3 \cdot O(n^3) = O(3 + n^3)$$
2020/01/22
[ "https://math.stackexchange.com/questions/3518702", "https://math.stackexchange.com", "https://math.stackexchange.com/users/725321/" ]
(1)-(2) gives $a=b$ or $3(a+b)=-1$. If $a=b$ then the first equation gives $a=b=0$ or $a=b=\frac{1}{2}$. (1) gives $3(a+b)(a^2-ab+b^2)=3ab$. Substituting $3(a+b)=-1$ gives $(a+b)^2=0$, so $a+b=0$. Contradicting $3(a+b)=-1$. So the only solutions are $(a,b)=(0,0)$ or $(\frac{1}{2},\frac{1}{2})$
From equation (2) you get that $(a-b)(3(a+b)+1)=0$. Then, either $a=b$ or $3(a+b)+1=0$. In the first case we get, putting $b=a$ in equation (1), that $a^2(2a-1)=0$. So, either $a=b=0$, or $a=b=1/2$. Assume now that $a\neq b$. Then $b=-1/3-a$. Putting this in equation (1) you get that $$a^3-a(-1/3-a)+(-1/3-a)^3=0$$ ...
1,025,126
This is a community wiki that asks the question, "Just how semantic can our HTML markup get thanks to HTML 5?" Below You can find the source code of a sample HTML 5 page. The object is to make a very usable, accessible, style-able webpage using as few classes and IDs as possible. Also, when do you plan to start implem...
2009/06/22
[ "https://Stackoverflow.com/questions/1025126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126329/" ]
Keep in mind that the `cite` element is not appropriate for a person's name: [HTML5](http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-cite-element) states "A person's name is not the title of a work — even if people call that person a piece of work — and the element must therefo...
People keep mentioning a javascript solution for older browsers such as ie6 but what if they do not support javascript? Sorry not an answer but more a ????? As this is the point I just don't get about semantic html5 and IE support. You could always go belt and braces for older browsers ``` <nav><div id="nav"> som...
1,025,126
This is a community wiki that asks the question, "Just how semantic can our HTML markup get thanks to HTML 5?" Below You can find the source code of a sample HTML 5 page. The object is to make a very usable, accessible, style-able webpage using as few classes and IDs as possible. Also, when do you plan to start implem...
2009/06/22
[ "https://Stackoverflow.com/questions/1025126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126329/" ]
It won't be 10+ years. That time period is for "final completion", all browsers support all parts of the spec. It's due to become a candidate late this year, early next, and hopefully approved by 2011/2. I'm phasing it it in where I can, right now. How much I use depends on audience, but since IE share has been fallin...
The main driver for people adopting HTML 5 would be better search engine placement, without that, I'm not seeing a huge reason to adopt. (Maybe if people could somehow convince me that the web might be more data-like and therefore interoperability would improve, then I might be somewhat convinced, but that sounds a bi...
1,025,126
This is a community wiki that asks the question, "Just how semantic can our HTML markup get thanks to HTML 5?" Below You can find the source code of a sample HTML 5 page. The object is to make a very usable, accessible, style-able webpage using as few classes and IDs as possible. Also, when do you plan to start implem...
2009/06/22
[ "https://Stackoverflow.com/questions/1025126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126329/" ]
It won't be 10+ years. That time period is for "final completion", all browsers support all parts of the spec. It's due to become a candidate late this year, early next, and hopefully approved by 2011/2. I'm phasing it it in where I can, right now. How much I use depends on audience, but since IE share has been fallin...
People keep mentioning a javascript solution for older browsers such as ie6 but what if they do not support javascript? Sorry not an answer but more a ????? As this is the point I just don't get about semantic html5 and IE support. You could always go belt and braces for older browsers ``` <nav><div id="nav"> som...
1,025,126
This is a community wiki that asks the question, "Just how semantic can our HTML markup get thanks to HTML 5?" Below You can find the source code of a sample HTML 5 page. The object is to make a very usable, accessible, style-able webpage using as few classes and IDs as possible. Also, when do you plan to start implem...
2009/06/22
[ "https://Stackoverflow.com/questions/1025126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126329/" ]
Although I take great happiness in seeing new capabilities, the truth still remains that my clients use IE6 (and similar browsers). As much as I would like to see everybody using a modern browser, the fact that they aren't means I have to work with technologies that don't require them to upgrade.
I'll echo jonothan sampson. As long as a reasonable number of people are still using older browsers, it's hard to make that jump. On the other hand, it's probably sensible to detect browsers and send a version that makes good sense. Since the differences between the two languages will be moderate, it will probably be ...
1,025,126
This is a community wiki that asks the question, "Just how semantic can our HTML markup get thanks to HTML 5?" Below You can find the source code of a sample HTML 5 page. The object is to make a very usable, accessible, style-able webpage using as few classes and IDs as possible. Also, when do you plan to start implem...
2009/06/22
[ "https://Stackoverflow.com/questions/1025126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126329/" ]
It won't be 10+ years. That time period is for "final completion", all browsers support all parts of the spec. It's due to become a candidate late this year, early next, and hopefully approved by 2011/2. I'm phasing it it in where I can, right now. How much I use depends on audience, but since IE share has been fallin...
I'm going to use it as soon as browsers support it. The sites I make are mainly hobby projects mostly visited by Firefox users. (80% of my traffic uses the latest version of FF).
1,025,126
This is a community wiki that asks the question, "Just how semantic can our HTML markup get thanks to HTML 5?" Below You can find the source code of a sample HTML 5 page. The object is to make a very usable, accessible, style-able webpage using as few classes and IDs as possible. Also, when do you plan to start implem...
2009/06/22
[ "https://Stackoverflow.com/questions/1025126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126329/" ]
Although I take great happiness in seeing new capabilities, the truth still remains that my clients use IE6 (and similar browsers). As much as I would like to see everybody using a modern browser, the fact that they aren't means I have to work with technologies that don't require them to upgrade.
People keep mentioning a javascript solution for older browsers such as ie6 but what if they do not support javascript? Sorry not an answer but more a ????? As this is the point I just don't get about semantic html5 and IE support. You could always go belt and braces for older browsers ``` <nav><div id="nav"> som...
1,025,126
This is a community wiki that asks the question, "Just how semantic can our HTML markup get thanks to HTML 5?" Below You can find the source code of a sample HTML 5 page. The object is to make a very usable, accessible, style-able webpage using as few classes and IDs as possible. Also, when do you plan to start implem...
2009/06/22
[ "https://Stackoverflow.com/questions/1025126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126329/" ]
I'm going to use it as soon as browsers support it. The sites I make are mainly hobby projects mostly visited by Firefox users. (80% of my traffic uses the latest version of FF).
Keep in mind that the `cite` element is not appropriate for a person's name: [HTML5](http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-cite-element) states "A person's name is not the title of a work — even if people call that person a piece of work — and the element must therefo...
1,025,126
This is a community wiki that asks the question, "Just how semantic can our HTML markup get thanks to HTML 5?" Below You can find the source code of a sample HTML 5 page. The object is to make a very usable, accessible, style-able webpage using as few classes and IDs as possible. Also, when do you plan to start implem...
2009/06/22
[ "https://Stackoverflow.com/questions/1025126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126329/" ]
Keep in mind that the `cite` element is not appropriate for a person's name: [HTML5](http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-cite-element) states "A person's name is not the title of a work — even if people call that person a piece of work — and the element must therefo...
I'll echo jonothan sampson. As long as a reasonable number of people are still using older browsers, it's hard to make that jump. On the other hand, it's probably sensible to detect browsers and send a version that makes good sense. Since the differences between the two languages will be moderate, it will probably be ...
1,025,126
This is a community wiki that asks the question, "Just how semantic can our HTML markup get thanks to HTML 5?" Below You can find the source code of a sample HTML 5 page. The object is to make a very usable, accessible, style-able webpage using as few classes and IDs as possible. Also, when do you plan to start implem...
2009/06/22
[ "https://Stackoverflow.com/questions/1025126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126329/" ]
I'm going to use it as soon as browsers support it. The sites I make are mainly hobby projects mostly visited by Firefox users. (80% of my traffic uses the latest version of FF).
People keep mentioning a javascript solution for older browsers such as ie6 but what if they do not support javascript? Sorry not an answer but more a ????? As this is the point I just don't get about semantic html5 and IE support. You could always go belt and braces for older browsers ``` <nav><div id="nav"> som...
1,025,126
This is a community wiki that asks the question, "Just how semantic can our HTML markup get thanks to HTML 5?" Below You can find the source code of a sample HTML 5 page. The object is to make a very usable, accessible, style-able webpage using as few classes and IDs as possible. Also, when do you plan to start implem...
2009/06/22
[ "https://Stackoverflow.com/questions/1025126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126329/" ]
It won't be 10+ years. That time period is for "final completion", all browsers support all parts of the spec. It's due to become a candidate late this year, early next, and hopefully approved by 2011/2. I'm phasing it it in where I can, right now. How much I use depends on audience, but since IE share has been fallin...
I'll echo jonothan sampson. As long as a reasonable number of people are still using older browsers, it's hard to make that jump. On the other hand, it's probably sensible to detect browsers and send a version that makes good sense. Since the differences between the two languages will be moderate, it will probably be ...
37,570,064
``` state_dict = {'Alabama' :'AL' ,'Montana': 'MT', 'Alaska' :'AK', 'Nebraska': 'NE', 'Arizona': 'AZ', 'Nevada': 'NV', 'Arkansas': 'AR', 'New Hampshire': 'NH', 'California': 'CA', 'New Jersey': 'NJ', 'Colorado': 'CO', 'New Mexico': 'NM', 'Connecticut': 'CT', 'New York': 'NY', 'Delaware': ...
2016/06/01
[ "https://Stackoverflow.com/questions/37570064", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2058355/" ]
You're on the right track. Simply loop over the dictionary and make replacements using the `replace` method. A convenient way to loop over the dictionary in this case is to use the `.items()` method, which returns `(key, value)` tuples that you can break apart to give better names to each item. ``` In [1]: text = 'Sui...
You can try this: ``` state_dict = {'Alabama' :'AL' ,'Montana': 'MT', 'Alaska' :'AK', 'Nebraska': 'NE', 'Arizona': 'AZ', 'Nevada': 'NV', 'Arkansas': 'AR', 'New Hampshire': 'NH', 'California': 'CA', 'New Jersey': 'NJ', 'Colorado': 'CO', 'New Mexico': 'NM', 'Connecticut': 'CT', 'New York': '...
101,146
From Obama's second inaugural speech: > > We, the people, declare today that the most evident of truths – that all of us are created equal – is the star that guides us still; just as it guided our forebears through Seneca Falls, and Selma, and Stonewall; just as it guided all those men and women, sung and unsung, who...
2013/01/23
[ "https://english.stackexchange.com/questions/101146", "https://english.stackexchange.com", "https://english.stackexchange.com/users/36258/" ]
By adding the *a*, Obama elevated MLK to an archetype, just as an intellectually average or above person might say, "I'm no [= not **an**] Einstein, but it seems to me that doing the same thing and expecting a different outcome is insanity in this case". It doesn't mean that MLK was the king of anything, only that he i...
It is a pun being used stylistically. MLK is likened unto a king, and King happens to be his name.
101,146
From Obama's second inaugural speech: > > We, the people, declare today that the most evident of truths – that all of us are created equal – is the star that guides us still; just as it guided our forebears through Seneca Falls, and Selma, and Stonewall; just as it guided all those men and women, sung and unsung, who...
2013/01/23
[ "https://english.stackexchange.com/questions/101146", "https://english.stackexchange.com", "https://english.stackexchange.com/users/36258/" ]
By adding the *a*, Obama elevated MLK to an archetype, just as an intellectually average or above person might say, "I'm no [= not **an**] Einstein, but it seems to me that doing the same thing and expecting a different outcome is insanity in this case". It doesn't mean that MLK was the king of anything, only that he i...
Perhaps he meant to give the phrase a subtle *double entendre*. I could be read to mean Martin Luther King Jr. and it could also have a meaning that we need to be guided by leaders (even if they are kings) who value individual freedom for all people. This is perhaps a subtle, somewhat ironic reference to some kings e...
101,146
From Obama's second inaugural speech: > > We, the people, declare today that the most evident of truths – that all of us are created equal – is the star that guides us still; just as it guided our forebears through Seneca Falls, and Selma, and Stonewall; just as it guided all those men and women, sung and unsung, who...
2013/01/23
[ "https://english.stackexchange.com/questions/101146", "https://english.stackexchange.com", "https://english.stackexchange.com/users/36258/" ]
It is a pun being used stylistically. MLK is likened unto a king, and King happens to be his name.
Perhaps he meant to give the phrase a subtle *double entendre*. I could be read to mean Martin Luther King Jr. and it could also have a meaning that we need to be guided by leaders (even if they are kings) who value individual freedom for all people. This is perhaps a subtle, somewhat ironic reference to some kings e...
101,146
From Obama's second inaugural speech: > > We, the people, declare today that the most evident of truths – that all of us are created equal – is the star that guides us still; just as it guided our forebears through Seneca Falls, and Selma, and Stonewall; just as it guided all those men and women, sung and unsung, who...
2013/01/23
[ "https://english.stackexchange.com/questions/101146", "https://english.stackexchange.com", "https://english.stackexchange.com/users/36258/" ]
Stylistically, the phrase "to hear a King proclaim..." echoes the previous construction "to hear a preacher say...." The repetition of the indefinite article maintains the flow of the speech. (Imagine how awkward it would have sounded if, in place of "to hear a King proclaim," Obama had said "to hear the Reverend Dr. M...
It is a pun being used stylistically. MLK is likened unto a king, and King happens to be his name.
101,146
From Obama's second inaugural speech: > > We, the people, declare today that the most evident of truths – that all of us are created equal – is the star that guides us still; just as it guided our forebears through Seneca Falls, and Selma, and Stonewall; just as it guided all those men and women, sung and unsung, who...
2013/01/23
[ "https://english.stackexchange.com/questions/101146", "https://english.stackexchange.com", "https://english.stackexchange.com/users/36258/" ]
Stylistically, the phrase "to hear a King proclaim..." echoes the previous construction "to hear a preacher say...." The repetition of the indefinite article maintains the flow of the speech. (Imagine how awkward it would have sounded if, in place of "to hear a King proclaim," Obama had said "to hear the Reverend Dr. M...
Perhaps he meant to give the phrase a subtle *double entendre*. I could be read to mean Martin Luther King Jr. and it could also have a meaning that we need to be guided by leaders (even if they are kings) who value individual freedom for all people. This is perhaps a subtle, somewhat ironic reference to some kings e...
8,410,047
I would like to shorten a url (e.g. <http://www.abc.com/products/bag.aspx>) to something like (http://short.me/bag). I have found that rules can be added to web.config to detect the short link to open the correct page. But I need a dynamic web.config. Is it a good idea to keep updating the web.config whenever a user cr...
2011/12/07
[ "https://Stackoverflow.com/questions/8410047", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1084789/" ]
You need to create a database mapping short URLs to long URLs. You would then create an HTTP handler that looks up the short URL in that database and redirects to the corresponding long URL. Then, register that handler to run for all requests.
Bit.ly lets you use custom domain names now: <https://bitly.com/pro/products>, check out [this part of their FAQ](https://bitly.com/a/help#i_6_0)
5,492,825
Suppose I got these urls. ``` http://abdd.eesfea.domainname.com/b/33tA$/0021/file http://mail.domainname.org/abc/abc/aaa http://domainname.edu ``` I just want to extract "domainame.com" or "domainname.org" or "domainname.edu" out. How can I do this? I think, I need to find the last "dot" just before "com|org|edu.....
2011/03/30
[ "https://Stackoverflow.com/questions/5492825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/435645/" ]
why use regex? <http://docs.python.org/library/urlparse.html>
In addition to Jase' answer. If you don't wan't to use urlparse, just split the URL's. Strip of the protocol (http:// or https://) The you just split the string by first occurrence of '/'. This will leave you with something like: 'mail.domainname.org' on the second URL. This can then be split by '.' and the you just s...
5,492,825
Suppose I got these urls. ``` http://abdd.eesfea.domainname.com/b/33tA$/0021/file http://mail.domainname.org/abc/abc/aaa http://domainname.edu ``` I just want to extract "domainame.com" or "domainname.org" or "domainname.edu" out. How can I do this? I think, I need to find the last "dot" just before "com|org|edu.....
2011/03/30
[ "https://Stackoverflow.com/questions/5492825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/435645/" ]
why use regex? <http://docs.python.org/library/urlparse.html>
Should you need more flexibility than `urlparse` provides, here's an example to get you started: ``` import re def getDomain(url): #requires 'http://' or 'https://' #pat = r'(https?):\/\/(\w+\.)*(?P<domain>\w+)\.(\w+)(\/.*)?' #'http://' or 'https://' is optional pat = r'((https?):\/\/)?(\w+\.)*(?P<doma...
5,492,825
Suppose I got these urls. ``` http://abdd.eesfea.domainname.com/b/33tA$/0021/file http://mail.domainname.org/abc/abc/aaa http://domainname.edu ``` I just want to extract "domainame.com" or "domainname.org" or "domainname.edu" out. How can I do this? I think, I need to find the last "dot" just before "com|org|edu.....
2011/03/30
[ "https://Stackoverflow.com/questions/5492825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/435645/" ]
why use regex? <http://docs.python.org/library/urlparse.html>
If you would like to go the regex route... RFC-3986 is the authority regarding URIs. [Appendix B](https://www.rfc-editor.org/rfc/rfc3986#appendix-B) provides this regex to break one down into its components: ```py re_3986 = r"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?" # Where: # scheme = $2 # autho...
5,492,825
Suppose I got these urls. ``` http://abdd.eesfea.domainname.com/b/33tA$/0021/file http://mail.domainname.org/abc/abc/aaa http://domainname.edu ``` I just want to extract "domainame.com" or "domainname.org" or "domainname.edu" out. How can I do this? I think, I need to find the last "dot" just before "com|org|edu.....
2011/03/30
[ "https://Stackoverflow.com/questions/5492825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/435645/" ]
If you would like to go the regex route... RFC-3986 is the authority regarding URIs. [Appendix B](https://www.rfc-editor.org/rfc/rfc3986#appendix-B) provides this regex to break one down into its components: ```py re_3986 = r"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?" # Where: # scheme = $2 # autho...
In addition to Jase' answer. If you don't wan't to use urlparse, just split the URL's. Strip of the protocol (http:// or https://) The you just split the string by first occurrence of '/'. This will leave you with something like: 'mail.domainname.org' on the second URL. This can then be split by '.' and the you just s...
5,492,825
Suppose I got these urls. ``` http://abdd.eesfea.domainname.com/b/33tA$/0021/file http://mail.domainname.org/abc/abc/aaa http://domainname.edu ``` I just want to extract "domainame.com" or "domainname.org" or "domainname.edu" out. How can I do this? I think, I need to find the last "dot" just before "com|org|edu.....
2011/03/30
[ "https://Stackoverflow.com/questions/5492825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/435645/" ]
If you would like to go the regex route... RFC-3986 is the authority regarding URIs. [Appendix B](https://www.rfc-editor.org/rfc/rfc3986#appendix-B) provides this regex to break one down into its components: ```py re_3986 = r"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?" # Where: # scheme = $2 # autho...
Should you need more flexibility than `urlparse` provides, here's an example to get you started: ``` import re def getDomain(url): #requires 'http://' or 'https://' #pat = r'(https?):\/\/(\w+\.)*(?P<domain>\w+)\.(\w+)(\/.*)?' #'http://' or 'https://' is optional pat = r'((https?):\/\/)?(\w+\.)*(?P<doma...
30,079,187
This is my code: ``` <div class="two-columns"> <div class="col-half"> <label for="city">Città</label> <input type="text" name="city" class="required"> </div> <div class="col-half"> <label for="province">Provincia</label><br> ...
2015/05/06
[ "https://Stackoverflow.com/questions/30079187", "https://Stackoverflow.com", "https://Stackoverflow.com/users/932957/" ]
Your query should work just fine assuming that you actually have the `54e328ec537d3d20bbdf2ed5` value included in any `sources` field within any `builds` document. What I mean is, you can't query the `builds` endpoint for the existence of a document in the `sources` endpoint (you can of course do that at the `sources`...
New to Eve but I have an advance on Nicola's "should work", because my experience is that it does not and as this question is what comes up when looking trying to deal with the frustration of figuring out why... Debugging this the library got me to the point where Eve automagically decides that something with a signat...
718,213
When I was in my school I was taught that the electric field due to the battery is **along** the wire (from $A \rightarrow B \rightarrow C \rightarrow D $) and these are responsible for electrons at each location to move which constitutes the current. [![enter image description here](https://i.stack.imgur.com/4Q2s0.jp...
2022/07/13
[ "https://physics.stackexchange.com/questions/718213", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/271783/" ]
> > there can't be any component of electric field along the length of the wire as it would result in a potential drop without any resistor. So this indicates that the electric field must be perpendicular to the wire itself . > > > This is incorrect. If there was no resistor, the battery would still cause potentia...
**Solution:** The potential at A and B are not equal. When R=0, most people blindly say that the potential across the wire is always zero, this is completely false. E=0 is an abstraction as the pd across the wire is small incomparison to the resistor, but definitely not zero This question is more simply rephrased as:...
718,213
When I was in my school I was taught that the electric field due to the battery is **along** the wire (from $A \rightarrow B \rightarrow C \rightarrow D $) and these are responsible for electrons at each location to move which constitutes the current. [![enter image description here](https://i.stack.imgur.com/4Q2s0.jp...
2022/07/13
[ "https://physics.stackexchange.com/questions/718213", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/271783/" ]
> > But when I tried to merge the above two ideas , I got a contradiction. > > > Yes, you are correct. There is a contradiction. > > And we also learned that the potential at A and B is the same and that at C and D are same too (ideal circuits) while solving circuit problems. > > > This statement applies to ...
> > there can't be any component of electric field along the length of the wire as it would result in a potential drop without any resistor. So this indicates that the electric field must be perpendicular to the wire itself . > > > This is incorrect. If there was no resistor, the battery would still cause potentia...
718,213
When I was in my school I was taught that the electric field due to the battery is **along** the wire (from $A \rightarrow B \rightarrow C \rightarrow D $) and these are responsible for electrons at each location to move which constitutes the current. [![enter image description here](https://i.stack.imgur.com/4Q2s0.jp...
2022/07/13
[ "https://physics.stackexchange.com/questions/718213", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/271783/" ]
> > But when I tried to merge the above two ideas , I got a contradiction. > > > Yes, you are correct. There is a contradiction. > > And we also learned that the potential at A and B is the same and that at C and D are same too (ideal circuits) while solving circuit problems. > > > This statement applies to ...
**Solution:** The potential at A and B are not equal. When R=0, most people blindly say that the potential across the wire is always zero, this is completely false. E=0 is an abstraction as the pd across the wire is small incomparison to the resistor, but definitely not zero This question is more simply rephrased as:...
718,213
When I was in my school I was taught that the electric field due to the battery is **along** the wire (from $A \rightarrow B \rightarrow C \rightarrow D $) and these are responsible for electrons at each location to move which constitutes the current. [![enter image description here](https://i.stack.imgur.com/4Q2s0.jp...
2022/07/13
[ "https://physics.stackexchange.com/questions/718213", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/271783/" ]
Try not to think of the battery creating an electric field in the wires. So where is the field *gradient* created? **In the resistor.** We say that the voltage *across* a resistor (applied by the battery) creates an electric field *gradient* in the resistor. Because the wires have such a low resistance it is challengi...
**Solution:** The potential at A and B are not equal. When R=0, most people blindly say that the potential across the wire is always zero, this is completely false. E=0 is an abstraction as the pd across the wire is small incomparison to the resistor, but definitely not zero This question is more simply rephrased as:...
718,213
When I was in my school I was taught that the electric field due to the battery is **along** the wire (from $A \rightarrow B \rightarrow C \rightarrow D $) and these are responsible for electrons at each location to move which constitutes the current. [![enter image description here](https://i.stack.imgur.com/4Q2s0.jp...
2022/07/13
[ "https://physics.stackexchange.com/questions/718213", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/271783/" ]
> > But when I tried to merge the above two ideas , I got a contradiction. > > > Yes, you are correct. There is a contradiction. > > And we also learned that the potential at A and B is the same and that at C and D are same too (ideal circuits) while solving circuit problems. > > > This statement applies to ...
Try not to think of the battery creating an electric field in the wires. So where is the field *gradient* created? **In the resistor.** We say that the voltage *across* a resistor (applied by the battery) creates an electric field *gradient* in the resistor. Because the wires have such a low resistance it is challengi...
24,411,754
I need to learn how to use String.Format to insert colons in the middle of a 4 char strings, e.g. 1300 -> 13:00, or 0500 -> 05:00
2014/06/25
[ "https://Stackoverflow.com/questions/24411754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2827377/" ]
You could use [`string.Insert`](http://msdn.microsoft.com/en-us/library/system.string.insert%28v=vs.110%29.aspx) method. ``` var formattedString = yourString.Insert(2, ":"); ```
What about the String.Insert method [http://msdn.microsoft.com/en-us/library/system.string.insert(v=vs.110).aspx](http://msdn.microsoft.com/en-us/library/system.string.insert%28v=vs.110%29.aspx) I hope that's help :)
24,411,754
I need to learn how to use String.Format to insert colons in the middle of a 4 char strings, e.g. 1300 -> 13:00, or 0500 -> 05:00
2014/06/25
[ "https://Stackoverflow.com/questions/24411754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2827377/" ]
What about the String.Insert method [http://msdn.microsoft.com/en-us/library/system.string.insert(v=vs.110).aspx](http://msdn.microsoft.com/en-us/library/system.string.insert%28v=vs.110%29.aspx) I hope that's help :)
if your string is always 4 characters length. Try This: ``` string str = "1300"; string Formatted = str.Substring(0, 2) + ":" + str.Substring(2, 2); ```
24,411,754
I need to learn how to use String.Format to insert colons in the middle of a 4 char strings, e.g. 1300 -> 13:00, or 0500 -> 05:00
2014/06/25
[ "https://Stackoverflow.com/questions/24411754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2827377/" ]
What about the String.Insert method [http://msdn.microsoft.com/en-us/library/system.string.insert(v=vs.110).aspx](http://msdn.microsoft.com/en-us/library/system.string.insert%28v=vs.110%29.aspx) I hope that's help :)
try this one: ``` string str = "0500"; string newstr = str.Insert(2, ":"); ```
24,411,754
I need to learn how to use String.Format to insert colons in the middle of a 4 char strings, e.g. 1300 -> 13:00, or 0500 -> 05:00
2014/06/25
[ "https://Stackoverflow.com/questions/24411754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2827377/" ]
What about the String.Insert method [http://msdn.microsoft.com/en-us/library/system.string.insert(v=vs.110).aspx](http://msdn.microsoft.com/en-us/library/system.string.insert%28v=vs.110%29.aspx) I hope that's help :)
This code do the job: ``` string str = "1234"; str=str.Insert(2, ":"); Console.Write(str); ```
24,411,754
I need to learn how to use String.Format to insert colons in the middle of a 4 char strings, e.g. 1300 -> 13:00, or 0500 -> 05:00
2014/06/25
[ "https://Stackoverflow.com/questions/24411754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2827377/" ]
You could use [`string.Insert`](http://msdn.microsoft.com/en-us/library/system.string.insert%28v=vs.110%29.aspx) method. ``` var formattedString = yourString.Insert(2, ":"); ```
if your string is always 4 characters length. Try This: ``` string str = "1300"; string Formatted = str.Substring(0, 2) + ":" + str.Substring(2, 2); ```
24,411,754
I need to learn how to use String.Format to insert colons in the middle of a 4 char strings, e.g. 1300 -> 13:00, or 0500 -> 05:00
2014/06/25
[ "https://Stackoverflow.com/questions/24411754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2827377/" ]
You could use [`string.Insert`](http://msdn.microsoft.com/en-us/library/system.string.insert%28v=vs.110%29.aspx) method. ``` var formattedString = yourString.Insert(2, ":"); ```
try this one: ``` string str = "0500"; string newstr = str.Insert(2, ":"); ```
24,411,754
I need to learn how to use String.Format to insert colons in the middle of a 4 char strings, e.g. 1300 -> 13:00, or 0500 -> 05:00
2014/06/25
[ "https://Stackoverflow.com/questions/24411754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2827377/" ]
You could use [`string.Insert`](http://msdn.microsoft.com/en-us/library/system.string.insert%28v=vs.110%29.aspx) method. ``` var formattedString = yourString.Insert(2, ":"); ```
This code do the job: ``` string str = "1234"; str=str.Insert(2, ":"); Console.Write(str); ```
5,061,629
I'm trying to find and create/import the Northwind database to practice my Linq-fu. I cannot find it for the life of me, searching just turns me to this page, which in turn tells me to find it on the official page which isn't there. <http://msdn.microsoft.com/en-us/library/ms227484%28v=vs.90%29.aspx> Where can I fin...
2011/02/21
[ "https://Stackoverflow.com/questions/5061629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Northwind doesn't come installed with SQL Server 2008. You can instead: * [download *scripts* for creating the Northwind and pubs sample databases](http://www.microsoft.com/downloads/en/details.aspx?FamilyId=06616212-0356-46A0-8DA2-EEBC53A68034&displaylang=en). * [download Northwind and pubs MDF/LDF from Microsoft](ht...
Try this for a step by step tutorial on how to find the download and install the Northwind and Pubs databases for Sql Server 2008. [northwind database sql server 2008](http://www.codeproject.com/KB/database/InstallingNorthwindAndPub.aspx)
5,061,629
I'm trying to find and create/import the Northwind database to practice my Linq-fu. I cannot find it for the life of me, searching just turns me to this page, which in turn tells me to find it on the official page which isn't there. <http://msdn.microsoft.com/en-us/library/ms227484%28v=vs.90%29.aspx> Where can I fin...
2011/02/21
[ "https://Stackoverflow.com/questions/5061629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Try this for a step by step tutorial on how to find the download and install the Northwind and Pubs databases for Sql Server 2008. [northwind database sql server 2008](http://www.codeproject.com/KB/database/InstallingNorthwindAndPub.aspx)
For any edition of SQL SERVER. You can create the database yourself using Northwind database creation script. Download Northwind.sql.zip from this site <https://northwinddatabase.codeplex.com/downloads/get/269239> then create a database called `Northwind` in your Sql Server then. Unzip / decompress the file then open...
5,061,629
I'm trying to find and create/import the Northwind database to practice my Linq-fu. I cannot find it for the life of me, searching just turns me to this page, which in turn tells me to find it on the official page which isn't there. <http://msdn.microsoft.com/en-us/library/ms227484%28v=vs.90%29.aspx> Where can I fin...
2011/02/21
[ "https://Stackoverflow.com/questions/5061629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Northwind doesn't come installed with SQL Server 2008. You can instead: * [download *scripts* for creating the Northwind and pubs sample databases](http://www.microsoft.com/downloads/en/details.aspx?FamilyId=06616212-0356-46A0-8DA2-EEBC53A68034&displaylang=en). * [download Northwind and pubs MDF/LDF from Microsoft](ht...
For any edition of SQL SERVER. You can create the database yourself using Northwind database creation script. Download Northwind.sql.zip from this site <https://northwinddatabase.codeplex.com/downloads/get/269239> then create a database called `Northwind` in your Sql Server then. Unzip / decompress the file then open...
38,431,070
``` http://localhost/mc/site-01-up/index.php?c=lorem-ipsum $address = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $stack = explode('/', $_SERVER["REQUEST_URI"]); $file = array_pop($stack); echo $file; ``` result - `index.php?c=lorem-ipsum` How to get just file name (`index.php`) without `$_GET` variable, usi...
2016/07/18
[ "https://Stackoverflow.com/questions/38431070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3044737/" ]
I will follow `parse_url()` like below (easy to understand):- ``` <?php $url = 'http://localhost/mc/site-01-up/index.php?c=lorem-ipsum'; $url= parse_url($url); print_r($url); // to check what parse_url() will outputs $url_path = explode('/',$url['path']); // explode the path part $file_name = $url_path[count($url_...
One way of doing it would be to simply get the `basename()` of the file and then strip-out all the Query Part using regex or better still simply do pass the `$_SERVER['PHP_SELF']` result to the `basename()` Function. Both will yield the same result though the 2nd approach seems a little more intuitive. ``` <?php ...
38,431,070
``` http://localhost/mc/site-01-up/index.php?c=lorem-ipsum $address = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $stack = explode('/', $_SERVER["REQUEST_URI"]); $file = array_pop($stack); echo $file; ``` result - `index.php?c=lorem-ipsum` How to get just file name (`index.php`) without `$_GET` variable, usi...
2016/07/18
[ "https://Stackoverflow.com/questions/38431070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3044737/" ]
One way of doing it would be to simply get the `basename()` of the file and then strip-out all the Query Part using regex or better still simply do pass the `$_SERVER['PHP_SELF']` result to the `basename()` Function. Both will yield the same result though the 2nd approach seems a little more intuitive. ``` <?php ...
If you are trying to use the GET method without variable name, another option would be using the $\_SERVER["QUERY\_STRING"] <http://something.com/index.php?=somestring> $\_SERVER["QUERY\_STRING"] would return "somestring"
38,431,070
``` http://localhost/mc/site-01-up/index.php?c=lorem-ipsum $address = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $stack = explode('/', $_SERVER["REQUEST_URI"]); $file = array_pop($stack); echo $file; ``` result - `index.php?c=lorem-ipsum` How to get just file name (`index.php`) without `$_GET` variable, usi...
2016/07/18
[ "https://Stackoverflow.com/questions/38431070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3044737/" ]
I will follow `parse_url()` like below (easy to understand):- ``` <?php $url = 'http://localhost/mc/site-01-up/index.php?c=lorem-ipsum'; $url= parse_url($url); print_r($url); // to check what parse_url() will outputs $url_path = explode('/',$url['path']); // explode the path part $file_name = $url_path[count($url_...
Try this, not tested: ``` $file = $_SERVER["SCRIPT_NAME"]; $parts = Explode('/', $file); $file = $parts[count($parts) - 1]; echo $file; ```
38,431,070
``` http://localhost/mc/site-01-up/index.php?c=lorem-ipsum $address = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $stack = explode('/', $_SERVER["REQUEST_URI"]); $file = array_pop($stack); echo $file; ``` result - `index.php?c=lorem-ipsum` How to get just file name (`index.php`) without `$_GET` variable, usi...
2016/07/18
[ "https://Stackoverflow.com/questions/38431070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3044737/" ]
Try this, not tested: ``` $file = $_SERVER["SCRIPT_NAME"]; $parts = Explode('/', $file); $file = $parts[count($parts) - 1]; echo $file; ```
If you are trying to use the GET method without variable name, another option would be using the $\_SERVER["QUERY\_STRING"] <http://something.com/index.php?=somestring> $\_SERVER["QUERY\_STRING"] would return "somestring"
38,431,070
``` http://localhost/mc/site-01-up/index.php?c=lorem-ipsum $address = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $stack = explode('/', $_SERVER["REQUEST_URI"]); $file = array_pop($stack); echo $file; ``` result - `index.php?c=lorem-ipsum` How to get just file name (`index.php`) without `$_GET` variable, usi...
2016/07/18
[ "https://Stackoverflow.com/questions/38431070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3044737/" ]
I will follow `parse_url()` like below (easy to understand):- ``` <?php $url = 'http://localhost/mc/site-01-up/index.php?c=lorem-ipsum'; $url= parse_url($url); print_r($url); // to check what parse_url() will outputs $url_path = explode('/',$url['path']); // explode the path part $file_name = $url_path[count($url_...
Another method that can get the filename is by using parse\_url — Parses a URL and return its components ``` <?php $url = "http://localhost/mc/site-01-up/index.php?c=lorem-ipsum"; $data = parse_url($url); $array = explode("/",$data['path']); $filename = $array[count($array)-1]; var_dump($filename); ``` Result ``` i...
38,431,070
``` http://localhost/mc/site-01-up/index.php?c=lorem-ipsum $address = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $stack = explode('/', $_SERVER["REQUEST_URI"]); $file = array_pop($stack); echo $file; ``` result - `index.php?c=lorem-ipsum` How to get just file name (`index.php`) without `$_GET` variable, usi...
2016/07/18
[ "https://Stackoverflow.com/questions/38431070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3044737/" ]
I will follow `parse_url()` like below (easy to understand):- ``` <?php $url = 'http://localhost/mc/site-01-up/index.php?c=lorem-ipsum'; $url= parse_url($url); print_r($url); // to check what parse_url() will outputs $url_path = explode('/',$url['path']); // explode the path part $file_name = $url_path[count($url_...
If you are trying to use the GET method without variable name, another option would be using the $\_SERVER["QUERY\_STRING"] <http://something.com/index.php?=somestring> $\_SERVER["QUERY\_STRING"] would return "somestring"
38,431,070
``` http://localhost/mc/site-01-up/index.php?c=lorem-ipsum $address = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $stack = explode('/', $_SERVER["REQUEST_URI"]); $file = array_pop($stack); echo $file; ``` result - `index.php?c=lorem-ipsum` How to get just file name (`index.php`) without `$_GET` variable, usi...
2016/07/18
[ "https://Stackoverflow.com/questions/38431070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3044737/" ]
Another method that can get the filename is by using parse\_url — Parses a URL and return its components ``` <?php $url = "http://localhost/mc/site-01-up/index.php?c=lorem-ipsum"; $data = parse_url($url); $array = explode("/",$data['path']); $filename = $array[count($array)-1]; var_dump($filename); ``` Result ``` i...
If you are trying to use the GET method without variable name, another option would be using the $\_SERVER["QUERY\_STRING"] <http://something.com/index.php?=somestring> $\_SERVER["QUERY\_STRING"] would return "somestring"
24,283,846
I have created a form on php that writes the result on a .txt file. What happens is that on my server all is working good, but on another server there is the following error: > > Warning: Cannot modify header information - headers already sent by (output started at /home1/alertme/public\_html/mavala/form.php:43) in...
2014/06/18
[ "https://Stackoverflow.com/questions/24283846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3561329/" ]
``` <?php ``` is your issue, its sending white space which sends the headers. Make sure that `<?php` is the very first thing in a php file also on a production server, them warnings should be suppressed
When using header you must not have any black space before your php open tag and any output before the header call. This behavior can change on different configuration and php versions. So, remove all blank spaces and your print\_r and your problem will be fixed !
24,283,846
I have created a form on php that writes the result on a .txt file. What happens is that on my server all is working good, but on another server there is the following error: > > Warning: Cannot modify header information - headers already sent by (output started at /home1/alertme/public\_html/mavala/form.php:43) in...
2014/06/18
[ "https://Stackoverflow.com/questions/24283846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3561329/" ]
When using header you must not have any black space before your php open tag and any output before the header call. This behavior can change on different configuration and php versions. So, remove all blank spaces and your print\_r and your problem will be fixed !
Try this ``` <?php if(isset($_POST['submit'])) { $name = $_POST['name']; $email = $_POST['email']; $new_content = "\r\nNome: " . $name; $new_content .= "\r\nEmail: " . $email; file_put_contents('emaillist.txt', $new_content, FILE_APPEND); $errors = error_get_last(); if(empty($errors)){ header('Location...
24,283,846
I have created a form on php that writes the result on a .txt file. What happens is that on my server all is working good, but on another server there is the following error: > > Warning: Cannot modify header information - headers already sent by (output started at /home1/alertme/public\_html/mavala/form.php:43) in...
2014/06/18
[ "https://Stackoverflow.com/questions/24283846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3561329/" ]
``` <?php ``` is your issue, its sending white space which sends the headers. Make sure that `<?php` is the very first thing in a php file also on a production server, them warnings should be suppressed
Try this ``` <?php if(isset($_POST['submit'])) { $name = $_POST['name']; $email = $_POST['email']; $new_content = "\r\nNome: " . $name; $new_content .= "\r\nEmail: " . $email; file_put_contents('emaillist.txt', $new_content, FILE_APPEND); $errors = error_get_last(); if(empty($errors)){ header('Location...
24,283,846
I have created a form on php that writes the result on a .txt file. What happens is that on my server all is working good, but on another server there is the following error: > > Warning: Cannot modify header information - headers already sent by (output started at /home1/alertme/public\_html/mavala/form.php:43) in...
2014/06/18
[ "https://Stackoverflow.com/questions/24283846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3561329/" ]
``` <?php ``` is your issue, its sending white space which sends the headers. Make sure that `<?php` is the very first thing in a php file also on a production server, them warnings should be suppressed
Use the code below: ``` <?php if(isset($_POST['submit'])) { $name = $_POST['name']; $email = $_POST['email']; $new_content = "\r\nNome: " . $name; $new_content .= "\r\nEmail: " . $email; file_put_contents('emaillist.txt', $new_content, FILE_APPEND); print_r(error_get_last()); echo '<meta http-equiv="refr...
24,283,846
I have created a form on php that writes the result on a .txt file. What happens is that on my server all is working good, but on another server there is the following error: > > Warning: Cannot modify header information - headers already sent by (output started at /home1/alertme/public\_html/mavala/form.php:43) in...
2014/06/18
[ "https://Stackoverflow.com/questions/24283846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3561329/" ]
Use the code below: ``` <?php if(isset($_POST['submit'])) { $name = $_POST['name']; $email = $_POST['email']; $new_content = "\r\nNome: " . $name; $new_content .= "\r\nEmail: " . $email; file_put_contents('emaillist.txt', $new_content, FILE_APPEND); print_r(error_get_last()); echo '<meta http-equiv="refr...
Try this ``` <?php if(isset($_POST['submit'])) { $name = $_POST['name']; $email = $_POST['email']; $new_content = "\r\nNome: " . $name; $new_content .= "\r\nEmail: " . $email; file_put_contents('emaillist.txt', $new_content, FILE_APPEND); $errors = error_get_last(); if(empty($errors)){ header('Location...
46,995,231
I downloaded a file for a game that requires Java to run. When I downloaded the file it saved as a WinRAR file. So I right clicked the file and pressed open with Java Platform SE Binary (As that was the only Java add-on that came up). Then an Error Message came up which says: > > Java Installation Not Completed. ...
2017/10/28
[ "https://Stackoverflow.com/questions/46995231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8849776/" ]
This can be run by using **Command prompt** 1. Open Command prompt (in windows: Windows+R -> type 'cmd' then enter) 2. Follow the path specified to your specific folder(upto where your jar file exists) for example: **D:\projects\folder1\innerFolder>** 3. now, java -jar filename.jar (then enter) for example: **D:\p...
go try to open it via cmd by following: press Win + "R" and type in "cmd" and press Enter Then you type in the following: ``` java -jar C:\Users\MyName\Desktop\The file name for The Game(2).jar ``` if that dont work try to give more information (the full error, where do you get the error? As a Messagebox? Or as te...
46,995,231
I downloaded a file for a game that requires Java to run. When I downloaded the file it saved as a WinRAR file. So I right clicked the file and pressed open with Java Platform SE Binary (As that was the only Java add-on that came up). Then an Error Message came up which says: > > Java Installation Not Completed. ...
2017/10/28
[ "https://Stackoverflow.com/questions/46995231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8849776/" ]
One of your files is corrupted. Simply download Jarfix and run it. The Breakdown has an easy and helpful website to using Jarfix. Simply follow the instructions and download it in the link below: <https://thebreakdown.xyz/jarfix-to-repair-jar-files-on-your-pc/>
go try to open it via cmd by following: press Win + "R" and type in "cmd" and press Enter Then you type in the following: ``` java -jar C:\Users\MyName\Desktop\The file name for The Game(2).jar ``` if that dont work try to give more information (the full error, where do you get the error? As a Messagebox? Or as te...
46,995,231
I downloaded a file for a game that requires Java to run. When I downloaded the file it saved as a WinRAR file. So I right clicked the file and pressed open with Java Platform SE Binary (As that was the only Java add-on that came up). Then an Error Message came up which says: > > Java Installation Not Completed. ...
2017/10/28
[ "https://Stackoverflow.com/questions/46995231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8849776/" ]
This can be run by using **Command prompt** 1. Open Command prompt (in windows: Windows+R -> type 'cmd' then enter) 2. Follow the path specified to your specific folder(upto where your jar file exists) for example: **D:\projects\folder1\innerFolder>** 3. now, java -jar filename.jar (then enter) for example: **D:\p...
It's very simple and easy! go to your downloads folder Click on the part where it says downloads and press backspace. It should show the download icon and an empty bar. In that area, type: cmd then press enter Once command prompt is open, type java - jar (NAME OF FILE).jar Example: java -jar Optifine-1.16.5.jar then pr...
46,995,231
I downloaded a file for a game that requires Java to run. When I downloaded the file it saved as a WinRAR file. So I right clicked the file and pressed open with Java Platform SE Binary (As that was the only Java add-on that came up). Then an Error Message came up which says: > > Java Installation Not Completed. ...
2017/10/28
[ "https://Stackoverflow.com/questions/46995231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8849776/" ]
One of your files is corrupted. Simply download Jarfix and run it. The Breakdown has an easy and helpful website to using Jarfix. Simply follow the instructions and download it in the link below: <https://thebreakdown.xyz/jarfix-to-repair-jar-files-on-your-pc/>
It's very simple and easy! go to your downloads folder Click on the part where it says downloads and press backspace. It should show the download icon and an empty bar. In that area, type: cmd then press enter Once command prompt is open, type java - jar (NAME OF FILE).jar Example: java -jar Optifine-1.16.5.jar then pr...
1,050,187
I have a HP ProBook with Windows 10. My keyboard just started acting super strange. When I press certain keys (shift, arrow keys, etc.), it acts weird; however, all the letter and number keys work fine. I went to a laptop repair shop today and they said it seems to be a software problem. They advised me to install W...
2016/03/08
[ "https://superuser.com/questions/1050187", "https://superuser.com", "https://superuser.com/users/393183/" ]
I'm seeing this on two different Win10 boxes. I think it's related (somehow) to the April 2018 Windows update. On one machine whenever you type the letter "d" into an Excel cell, Excel exits (!). This was fixed by reverting to the previous version of Windows. On another machine, whenever I type "We" into the first l...
Happen on both my laptop and desktop. When it happens I click "alt + tab" then click on a program that seems to fix it.
1,050,187
I have a HP ProBook with Windows 10. My keyboard just started acting super strange. When I press certain keys (shift, arrow keys, etc.), it acts weird; however, all the letter and number keys work fine. I went to a laptop repair shop today and they said it seems to be a software problem. They advised me to install W...
2016/03/08
[ "https://superuser.com/questions/1050187", "https://superuser.com", "https://superuser.com/users/393183/" ]
Try to install a new language. In my case, for example, the problem didn't get solved until I installed English (United Kingdom) Language although English (United States) was already installed.
maybe its a little late, I started having this issues too. It was a Windows update that was causing this. Uninstalled it and everything back to normal. Hope it helps.
1,050,187
I have a HP ProBook with Windows 10. My keyboard just started acting super strange. When I press certain keys (shift, arrow keys, etc.), it acts weird; however, all the letter and number keys work fine. I went to a laptop repair shop today and they said it seems to be a software problem. They advised me to install W...
2016/03/08
[ "https://superuser.com/questions/1050187", "https://superuser.com", "https://superuser.com/users/393183/" ]
Try to install a new language. In my case, for example, the problem didn't get solved until I installed English (United Kingdom) Language although English (United States) was already installed.
Happen on both my laptop and desktop. When it happens I click "alt + tab" then click on a program that seems to fix it.
1,050,187
I have a HP ProBook with Windows 10. My keyboard just started acting super strange. When I press certain keys (shift, arrow keys, etc.), it acts weird; however, all the letter and number keys work fine. I went to a laptop repair shop today and they said it seems to be a software problem. They advised me to install W...
2016/03/08
[ "https://superuser.com/questions/1050187", "https://superuser.com", "https://superuser.com/users/393183/" ]
@Jamgreen: ok I got it it's the graphic driver hotkey enabled. disable the same. If its intel Graphics, right click-> graphics options-> hot key -> disable. same kind of Steps for other graphics driver.
Try a USB keyboard and also try whether the issue is reproducible. If the issue is not reproducible, disable the laptop keyboard and use the USB. If the issue is also happening on the USB keyboard check that: 1. The Windows Speech Recognition is turned off 2. Sticky Keys is turned off