Computing desk | ||
---|---|---|
< December 11 | << Nov | December | Jan >> | December 13 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
That is, I want to see ".exe", or whatever, as part of the file name. StuRat ( talk) 05:41, 12 December 2012 (UTC)
(And a completely unrelated question, because I don't want this to get deleted.)
I have left a great many questions on this reference desk for the past few months about C and JQuery/Javascript. I am a complete newcomer jumping into coding, and had absolutely no base other than the books I was reading. I attempted to complete a CS project from my college in one quarter, and honestly I wasn't sure if I could do it.
You guys were one of my primary sources of help, and I cannot thank you collective lot enough. I could find no other site in the internet which offered exactly what I needed. You were:
1) fast (replies within minutes) 2) knowledgeable (your advice was sound and used language I could understand) 3) varied (many different people replied, corrected each other, linked to useful sites), and 4) patient. You dealt with my personal shortcomings in the field, and kept replying to me for days after the initial topic was posted. StuRat in particular I'd like to thank, but you all were great help and I could not have accomplished the project in the alloted time without you all. Thank you!
And now, so that this is still a computing question...
I like to visit forums. Sometimes, I visit forums in public places. Sometimes those forums have backgrounds I'd rather not have people see ( this is the forum in question.) Is there a way to get the giant background picture of Littlefoot from showing up? 169.231.126.85 ( talk) 08:28, 12 December 2012 (UTC)
javascript:styles='BODY%20{background-image:%20none%20!%20important;%20background-color:%20grey%20!%20important}';
%20newSS%20=%20document.createElement('link');
%20newSS.rel%20=%20'stylesheet';%20newSS.href%20=%20'data:text/css,'%20+%20escape(styles);
%20document.documentElement.childNodes0].appendChild(newSS);%20void%200
— Chowbok ☠ 18:23, 12 December 2012 (UTC)
Can you specify which browser it is you use? ¦ Reisio ( talk) 05:39, 13 December 2012 (UTC)
@-moz-document domain("gangoffive.net") { body { background: none !important; } }
(or something like that) added to
userContent.css
¦
Reisio (
talk) 00:17, 14 December 2012 (UTC)Ooh, Chowbot, your bookmarklet worked! Just to make sure I'm not stealing, I couldn't find a way to use the bookmark without publishing it on bookmarklet here, though I did credit you. (I also changed the color to black because grey is a bit of an eyesore on the forum in question.) If you want me to remove it, I need to know a new way to use your bookmarklet. And Stu, that had been my go-to strategy for years now, but recently I was in a cafe with tables to every side of me, so I thought it might be time to upgrade to a new solution. 169.231.52.28 ( talk) 09:07, 15 December 2012 (UTC)
userContent.css
. ¦
Reisio (
talk) 17:48, 15 December 2012 (UTC)I am trying to understand what the difference between hosting on VPS and a dedicated server is. Looking at prices for instance on [1], the cost seems comparable. Do I understand correctly that with the dedicated server I'd basically get an empty system with root access and can do with it whatever I like, while with the VPS I am limited to whatever the hosting provider decides to give me? bamse ( talk) 09:22, 12 December 2012 (UTC)
Do not think I am asking a doubt repeatedly.In previous times i could not express my doubt clearly.so once again i am sending in clear manner.
Part1:
Class table { Synchronized(this) { …………………… } }
Here we got lock on object of table class.
Part2:
Class table { Customer cust=new Customer(); Synchronized(cust) { …………………… } }
Here we got lock on object of customer.i.e on cust
- table class.In part1 we got lock on object of
We get lock on table class because object of table class may try to access the synchronized block from different places simultaneously.To
prevent it we got lock on object of table class in part1.
-Now come to part2:
Here we got lock on object of customer class
…
My doubts:
1)why should we lock an object in table class other than table class in part2?
2)2)If we do not get lock on cust in part 2 then we can access synchronized block using table class
If we lock cust then also we need object of table class to access synchronized block.
Object of table class only needed to access synchronized block.
Due to synchronization we prevented object of table class to access synchronized block simultaneously from different threads.
Then why should we lock object other than table class in table class?
3)Will object of customer class try to access the synchronized block simultaneously from different places?
4).In part2 we got lock on object other than table class.
In What situations getting lock in table class on an object of a class other than table is benefit of getting lock on object of customer class in part2?
5)What is the need to lock object of customer class i.e other than table class?
6)What damage will happen if we do not get lock on object of customer class in part2?
…
I think meaning of all questions is same.But I expressed doubts as I got.
I hope you answer
— Preceding
unsigned comment added by
Phanihup (
talk •
contribs) 10:05, 12 December 2012 (UTC)
190.60.93.218 ( talk) 12:29, 12 December 2012 (UTC)
{ Customer cust = new Customer(); synchronized (cust) { // ... } }
synchronized
block is guaranteed to have only one thread locking on the object, because no other thread can even see it. So the code will go happily through the synchronized
block every time, regardless of how many threads are concurrently executing the code. You must instead use some object that stays the same between threads, such as this
like you have done before, or the class object, or some object created outside the class and given to it as a parameter, like I showed you earlier.
JIP |
Talk 17:52, 12 December 2012 (UTC)
I'm in a computer networking class and am learning about repeaters and hubs. I have a rough understanding of why they are necessary -- the signal dissipates electrically over distance, or something, so it needs strengthening at intervals. But the article transatlantic cable claims that that cable did not originally have repeaters. If so, how could it work, given the extremely long distance? ± Lenoxus ( " *** ") 14:32, 12 December 2012 (UTC)
I'm looking for something that will go through HTML documents and insert soft-hyphen characters ("­") in words where they should break at ends of lines. Ideally, it'd be a command-line application, but I'll accept anything at this point--GUI app on any OS, web page, etc.
So far, the closest thing I've found is this web page. It mostly does what I want (it's a pain to have to paste my code back and forth, but I can live with that), but it's using some kind of algorithm that misses some very common words (for instance, "everything", "however", and "happened"), and at least once it's hyphenated something for me that it shouldn't have ("Stearns", as in "Bear Stearns").
I did manage to find (after a lot of searching) a plaintext list of hyphenated English words. If I was better with perl, it would probably be pretty simple to write a script that checked every word against this list and replaced it. Sadly, that's beyond my abilities. So... if anyone has some advice for me, I'd appreciate it. Also please let me know if I haven't been clear about what I'm after.— Chowbok ☠ 18:02, 12 December 2012 (UTC)
I want to use the font Source Code Pro in Powershell and Command Prompt. The standard method to do this is add a new value in the registry HKLM\Software\Microsoft\WindowsNT\CurrentVersion\Console\TrueTypeFont, name it as many zeroes as necessary to create a new value name, set the data to the font's name as it appears in \CurrentVersion\Fonts, and restart the computer. But that doesn't work for me, even though I am logged in as administrator. The font does not appear when I restart. In fact, I accidentally deleted Lucida Consola and Consolas's values from the registry and am left only with the awful "raster fonts". Pokajanje| Talk 18:13, 12 December 2012 (UTC)
Are js and css cached? For instance if I have a website and each page of it loads the same js/css in its header. Can I get any performance improvement if I just load the js/css which is relevant for the respective page? bamse ( talk) 21:25, 12 December 2012 (UTC)
I have various disk from libraries and my own that I've burnt previously. When i try to copy them into iTunes, even though they are from store-sold disks in many cases, iTunes only offers me the option to copy them to my hard drive as nameless disks with numbers assigned to the songs. How can I either (1) assign the disk a name in iTunes or (2) download it with media player and either avoid the problem or name it in media player if I have to? Thanks! μηδείς ( talk) 22:21, 12 December 2012 (UTC)
so, you know how the windows task manager networking tab has a graph for local area connection and one for wireless network connection? I'm working on my employer's laptop on my home wireless network. I'm pretty darn sure there is not a network cable plugged into this laptop. Anyway, I opened up task manager on this thing, and the wireless network connection graph is flat, and all the action is on the local area connection graph. ?? The only possibility I can think of is that has something to do with VPN (Cisco AnyConnect). Could that be it? I can't check out what it looks like without VPN because this thing is dedicated, no direct connecting to anything except our VPN, access to the web etc. is routed through the VPN and the business' proxy servers, firewalls, etc. Thanks in advance. Gzuckier ( talk) 22:59, 12 December 2012 (UTC)
Hello! In Java, I need to write multiple HashSets of Strings to a file. Is there an appreciable* performance difference on the loading side if I manually implement a "foreach String in HashSet, writeToFile(String)" and corresponding "loadHashSet(File)" code, over simply using the built-in serialization of HashSet? I'm particular concerned about the performance of reconstituting the HashSets from file on an Android device. I realize *appreciable is an extremely vague term; just wanted to get your guidance. Thank you.-- el Aprel ( facta- facienda) 23:57, 12 December 2012 (UTC)
Computing desk | ||
---|---|---|
< December 11 | << Nov | December | Jan >> | December 13 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
That is, I want to see ".exe", or whatever, as part of the file name. StuRat ( talk) 05:41, 12 December 2012 (UTC)
(And a completely unrelated question, because I don't want this to get deleted.)
I have left a great many questions on this reference desk for the past few months about C and JQuery/Javascript. I am a complete newcomer jumping into coding, and had absolutely no base other than the books I was reading. I attempted to complete a CS project from my college in one quarter, and honestly I wasn't sure if I could do it.
You guys were one of my primary sources of help, and I cannot thank you collective lot enough. I could find no other site in the internet which offered exactly what I needed. You were:
1) fast (replies within minutes) 2) knowledgeable (your advice was sound and used language I could understand) 3) varied (many different people replied, corrected each other, linked to useful sites), and 4) patient. You dealt with my personal shortcomings in the field, and kept replying to me for days after the initial topic was posted. StuRat in particular I'd like to thank, but you all were great help and I could not have accomplished the project in the alloted time without you all. Thank you!
And now, so that this is still a computing question...
I like to visit forums. Sometimes, I visit forums in public places. Sometimes those forums have backgrounds I'd rather not have people see ( this is the forum in question.) Is there a way to get the giant background picture of Littlefoot from showing up? 169.231.126.85 ( talk) 08:28, 12 December 2012 (UTC)
javascript:styles='BODY%20{background-image:%20none%20!%20important;%20background-color:%20grey%20!%20important}';
%20newSS%20=%20document.createElement('link');
%20newSS.rel%20=%20'stylesheet';%20newSS.href%20=%20'data:text/css,'%20+%20escape(styles);
%20document.documentElement.childNodes0].appendChild(newSS);%20void%200
— Chowbok ☠ 18:23, 12 December 2012 (UTC)
Can you specify which browser it is you use? ¦ Reisio ( talk) 05:39, 13 December 2012 (UTC)
@-moz-document domain("gangoffive.net") { body { background: none !important; } }
(or something like that) added to
userContent.css
¦
Reisio (
talk) 00:17, 14 December 2012 (UTC)Ooh, Chowbot, your bookmarklet worked! Just to make sure I'm not stealing, I couldn't find a way to use the bookmark without publishing it on bookmarklet here, though I did credit you. (I also changed the color to black because grey is a bit of an eyesore on the forum in question.) If you want me to remove it, I need to know a new way to use your bookmarklet. And Stu, that had been my go-to strategy for years now, but recently I was in a cafe with tables to every side of me, so I thought it might be time to upgrade to a new solution. 169.231.52.28 ( talk) 09:07, 15 December 2012 (UTC)
userContent.css
. ¦
Reisio (
talk) 17:48, 15 December 2012 (UTC)I am trying to understand what the difference between hosting on VPS and a dedicated server is. Looking at prices for instance on [1], the cost seems comparable. Do I understand correctly that with the dedicated server I'd basically get an empty system with root access and can do with it whatever I like, while with the VPS I am limited to whatever the hosting provider decides to give me? bamse ( talk) 09:22, 12 December 2012 (UTC)
Do not think I am asking a doubt repeatedly.In previous times i could not express my doubt clearly.so once again i am sending in clear manner.
Part1:
Class table { Synchronized(this) { …………………… } }
Here we got lock on object of table class.
Part2:
Class table { Customer cust=new Customer(); Synchronized(cust) { …………………… } }
Here we got lock on object of customer.i.e on cust
- table class.In part1 we got lock on object of
We get lock on table class because object of table class may try to access the synchronized block from different places simultaneously.To
prevent it we got lock on object of table class in part1.
-Now come to part2:
Here we got lock on object of customer class
…
My doubts:
1)why should we lock an object in table class other than table class in part2?
2)2)If we do not get lock on cust in part 2 then we can access synchronized block using table class
If we lock cust then also we need object of table class to access synchronized block.
Object of table class only needed to access synchronized block.
Due to synchronization we prevented object of table class to access synchronized block simultaneously from different threads.
Then why should we lock object other than table class in table class?
3)Will object of customer class try to access the synchronized block simultaneously from different places?
4).In part2 we got lock on object other than table class.
In What situations getting lock in table class on an object of a class other than table is benefit of getting lock on object of customer class in part2?
5)What is the need to lock object of customer class i.e other than table class?
6)What damage will happen if we do not get lock on object of customer class in part2?
…
I think meaning of all questions is same.But I expressed doubts as I got.
I hope you answer
— Preceding
unsigned comment added by
Phanihup (
talk •
contribs) 10:05, 12 December 2012 (UTC)
190.60.93.218 ( talk) 12:29, 12 December 2012 (UTC)
{ Customer cust = new Customer(); synchronized (cust) { // ... } }
synchronized
block is guaranteed to have only one thread locking on the object, because no other thread can even see it. So the code will go happily through the synchronized
block every time, regardless of how many threads are concurrently executing the code. You must instead use some object that stays the same between threads, such as this
like you have done before, or the class object, or some object created outside the class and given to it as a parameter, like I showed you earlier.
JIP |
Talk 17:52, 12 December 2012 (UTC)
I'm in a computer networking class and am learning about repeaters and hubs. I have a rough understanding of why they are necessary -- the signal dissipates electrically over distance, or something, so it needs strengthening at intervals. But the article transatlantic cable claims that that cable did not originally have repeaters. If so, how could it work, given the extremely long distance? ± Lenoxus ( " *** ") 14:32, 12 December 2012 (UTC)
I'm looking for something that will go through HTML documents and insert soft-hyphen characters ("­") in words where they should break at ends of lines. Ideally, it'd be a command-line application, but I'll accept anything at this point--GUI app on any OS, web page, etc.
So far, the closest thing I've found is this web page. It mostly does what I want (it's a pain to have to paste my code back and forth, but I can live with that), but it's using some kind of algorithm that misses some very common words (for instance, "everything", "however", and "happened"), and at least once it's hyphenated something for me that it shouldn't have ("Stearns", as in "Bear Stearns").
I did manage to find (after a lot of searching) a plaintext list of hyphenated English words. If I was better with perl, it would probably be pretty simple to write a script that checked every word against this list and replaced it. Sadly, that's beyond my abilities. So... if anyone has some advice for me, I'd appreciate it. Also please let me know if I haven't been clear about what I'm after.— Chowbok ☠ 18:02, 12 December 2012 (UTC)
I want to use the font Source Code Pro in Powershell and Command Prompt. The standard method to do this is add a new value in the registry HKLM\Software\Microsoft\WindowsNT\CurrentVersion\Console\TrueTypeFont, name it as many zeroes as necessary to create a new value name, set the data to the font's name as it appears in \CurrentVersion\Fonts, and restart the computer. But that doesn't work for me, even though I am logged in as administrator. The font does not appear when I restart. In fact, I accidentally deleted Lucida Consola and Consolas's values from the registry and am left only with the awful "raster fonts". Pokajanje| Talk 18:13, 12 December 2012 (UTC)
Are js and css cached? For instance if I have a website and each page of it loads the same js/css in its header. Can I get any performance improvement if I just load the js/css which is relevant for the respective page? bamse ( talk) 21:25, 12 December 2012 (UTC)
I have various disk from libraries and my own that I've burnt previously. When i try to copy them into iTunes, even though they are from store-sold disks in many cases, iTunes only offers me the option to copy them to my hard drive as nameless disks with numbers assigned to the songs. How can I either (1) assign the disk a name in iTunes or (2) download it with media player and either avoid the problem or name it in media player if I have to? Thanks! μηδείς ( talk) 22:21, 12 December 2012 (UTC)
so, you know how the windows task manager networking tab has a graph for local area connection and one for wireless network connection? I'm working on my employer's laptop on my home wireless network. I'm pretty darn sure there is not a network cable plugged into this laptop. Anyway, I opened up task manager on this thing, and the wireless network connection graph is flat, and all the action is on the local area connection graph. ?? The only possibility I can think of is that has something to do with VPN (Cisco AnyConnect). Could that be it? I can't check out what it looks like without VPN because this thing is dedicated, no direct connecting to anything except our VPN, access to the web etc. is routed through the VPN and the business' proxy servers, firewalls, etc. Thanks in advance. Gzuckier ( talk) 22:59, 12 December 2012 (UTC)
Hello! In Java, I need to write multiple HashSets of Strings to a file. Is there an appreciable* performance difference on the loading side if I manually implement a "foreach String in HashSet, writeToFile(String)" and corresponding "loadHashSet(File)" code, over simply using the built-in serialization of HashSet? I'm particular concerned about the performance of reconstituting the HashSets from file on an Android device. I realize *appreciable is an extremely vague term; just wanted to get your guidance. Thank you.-- el Aprel ( facta- facienda) 23:57, 12 December 2012 (UTC)