The Big Programming Thread - Page 794
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
Chocolate
United States2350 Posts
| ||
slmw
Finland233 Posts
| ||
Chocolate
United States2350 Posts
| ||
Manit0u
Poland17185 Posts
System: Ubuntu 14.04 Problem: I have a load balancer working on port 11223 but it won't accept connections from outside of the system (curl localthost:11223/url works fine, trying it from another computer in the network does not). I've tried 2 things:
Some outputs:
How can I open this port to public? | ||
Nesserev
Belgium2760 Posts
| ||
Manit0u
Poland17185 Posts
| ||
phar
United States1080 Posts
But yea if it's allowed, and you don't think you can get to better algorithms in a faster language, Python will do you better. You'll get smoked by any team that has a math person doing the algorithms and someone with a strong grasp of C++ by virtue of Python being slow AF. | ||
RainWhisper
United Arab Emirates333 Posts
This is not so much a programming question but sort of relates to it. I used to have a software saved folders in c:\John Doe\Documents\folder 1 c:\John Doe\Documents\folder 2 c:\John Doe\Documents\folder 3 my new software now wants these items to be in c:\John Doe\Documents\Personal\folder 1 c:\John Doe\Documents\Personal\folder 2 c:\John Doe\Documents\Personal\folder 3 This is the case for about a thousand folders. I tried searching online for tools but most of them are for bulk renaming not bulk moving. I was wondering if anyone knows of any specific software to do so or if anyone has any script they have used before to do such a thing. Thanks ![]() Sorry if its the wrong threat, seemed most relevant to programming to me i guess. | ||
Nesserev
Belgium2760 Posts
| ||
RainWhisper
United Arab Emirates333 Posts
On November 08 2016 16:34 Nesserev wrote: Is your example representative of your problem, because, if so, you could just use copy paste. If you mean manually copy paste. I have about 4,000 Root Folders - with about 20 folders in each. That would easily take 3-5 hours - with the possibility of a few mistakes. | ||
Acrofales
Spain17831 Posts
On November 08 2016 16:51 MarwanBaki wrote: If you mean manually copy paste. I have about 4,000 Root Folders - with about 20 folders in each. That would easily take 3-5 hours - with the possibility of a few mistakes. Still confused. What's wrong with cntrl-a cntrl-x, make new folder, cntrl-v. Wait for 4000 folders to be moved. In NTFS or ext2/3/4 this should be a few seconds at most. Other file systems may require longer. | ||
TBO
Germany1350 Posts
| ||
mantequilla
Turkey775 Posts
c:\John Doe\Documents\folder 2 c:\John Doe\Documents\folder 3 c:\John Doe\Documents\Personal\folder 1 c:\John Doe\Documents\Personal\folder 2 c:\John Doe\Documents\Personal\folder 3 where're the 4000 new ones? it looks like everything inside Documents just moved into Personal folder. | ||
Silvanel
Poland4690 Posts
On November 08 2016 16:08 MarwanBaki wrote: Hey All, This is not so much a programming question but sort of relates to it. I used to have a software saved folders in c:\John Doe\Documents\folder 1 c:\John Doe\Documents\folder 2 c:\John Doe\Documents\folder 3 my new software now wants these items to be in c:\John Doe\Documents\Personal\folder 1 c:\John Doe\Documents\Personal\folder 2 c:\John Doe\Documents\Personal\folder 3 This is the case for about a thousand folders. I tried searching online for tools but most of them are for bulk renaming not bulk moving. I was wondering if anyone knows of any specific software to do so or if anyone has any script they have used before to do such a thing. Thanks ![]() Sorry if its the wrong threat, seemed most relevant to programming to me i guess. robocopy or just write script for this. | ||
TBO
Germany1350 Posts
On November 08 2016 17:44 mantequilla wrote: c:\John Doe\Documents\folder 1 c:\John Doe\Documents\folder 2 c:\John Doe\Documents\folder 3 c:\John Doe\Documents\Personal\folder 1 c:\John Doe\Documents\Personal\folder 2 c:\John Doe\Documents\Personal\folder 3 where're the 4000 new ones? it looks like everything inside Documents just moved into Personal folder. ah right my bad, didn't think correctly. [deleted unrelated question , because found out I am stupid] | ||
![]()
BisuDagger
Bisutopia19152 Posts
On November 08 2016 16:08 MarwanBaki wrote: Hey All, This is not so much a programming question but sort of relates to it. I used to have a software saved folders in c:\John Doe\Documents\folder 1 c:\John Doe\Documents\folder 2 c:\John Doe\Documents\folder 3 my new software now wants these items to be in c:\John Doe\Documents\Personal\folder 1 c:\John Doe\Documents\Personal\folder 2 c:\John Doe\Documents\Personal\folder 3 This is the case for about a thousand folders. I tried searching online for tools but most of them are for bulk renaming not bulk moving. I was wondering if anyone knows of any specific software to do so or if anyone has any script they have used before to do such a thing. Thanks ![]() Sorry if its the wrong threat, seemed most relevant to programming to me i guess. A bat file can work. I use something similar when making builds for my simulations. This is a sample of me first deleting items from a directory and then moving new ones in there from another directory.
| ||
RainWhisper
United Arab Emirates333 Posts
On November 09 2016 00:13 BisuDagger wrote: A bat file can work. I use something similar when making builds for my simulations. This is a sample of me first deleting items from a directory and then moving new ones in there from another directory.
Oh boy - I guess its time i learn how to make bat files ![]() Thanks alot. AS far as the other comments - im not sure if i was clear enough so im going to give you the exact example just for kicks. c:\data\employees\1\bloodreport\bloodreport.pdf c:\data\employees\1\fitness\fitness.pdf c:\data\employees\1\mri\mri.pdf c:\data\employees\2\bloodreport\bloodreport.pdf c:\data\employees\2\fitness\fitness.pdf c:\data\employees\2\mri\mri.pdf Where 2 is the id of the employee. The new system wants the data in c:\data\employees\1\Medical Tests\bloodreport\bloodreport.pdf c:\data\employees\1\Medical Tests\fitness\fitness.pdf c:\data\employees\1\Medical Tests\mri\mri.pdf c:\data\employees\2\Medical Tests\bloodreport\bloodreport.pdf c:\data\employees\2\Medical Tests\fitness\fitness.pdf c:\data\employees\2\Medical Tests\mri\mri.pdf And i have around 4,000 employees. So i can't go into each folder and create a new folder then ctrl a ctrl x ctrl v ![]() | ||
mantequilla
Turkey775 Posts
copy a few of it to somewhere else, test your script there 5-10 times, until you are sure it works correctly, then back up your 4k folders to somewhere then shoot ![]() | ||
Manit0u
Poland17185 Posts
On November 09 2016 04:56 MarwanBaki wrote: Oh boy - I guess its time i learn how to make bat files ![]() Thanks alot. AS far as the other comments - im not sure if i was clear enough so im going to give you the exact example just for kicks. c:\data\employees\1\bloodreport\bloodreport.pdf c:\data\employees\1\fitness\fitness.pdf c:\data\employees\1\mri\mri.pdf c:\data\employees\2\bloodreport\bloodreport.pdf c:\data\employees\2\fitness\fitness.pdf c:\data\employees\2\mri\mri.pdf Where 2 is the id of the employee. The new system wants the data in c:\data\employees\1\Medical Tests\bloodreport\bloodreport.pdf c:\data\employees\1\Medical Tests\fitness\fitness.pdf c:\data\employees\1\Medical Tests\mri\mri.pdf c:\data\employees\2\Medical Tests\bloodreport\bloodreport.pdf c:\data\employees\2\Medical Tests\fitness\fitness.pdf c:\data\employees\2\Medical Tests\mri\mri.pdf And i have around 4,000 employees. So i can't go into each folder and create a new folder then ctrl a ctrl x ctrl v ![]() Wait... Is there no settings in the system to set up the pick-up directory paths? Anyway, since it's just a simple matter of changing /2/bloodreport/ to /2/Medical Tests/bloodreport/ I'd just write some php/python/ruby/whatever script and do it with it. Or you could do it on Linux without much hassle. | ||
Djagulingu
Germany3605 Posts
Can you be less opinionated pls? Kthx. Sincerely. P.S: I still like you. | ||
| ||