Member Avatar
DAN_22 Joined the Community
Member Avatar
Topic by Joe_32 in Programming
c++
its shows only 1000 , 500, 200 , 100 , 50 , 20 , 10 , 5, 1...
but cents not showing Reply by Joe_32
Member Avatar
Topic by Joe_32 in Programming
c++
still not showing the cents.. :( Reply by Joe_32
Member Avatar
Topic by Joe_32 in Programming
c++
Yes it is! Reply by ddanbe
Member Avatar
Topic by Joe_32 in Programming
c++
thanks..
but how should i make it..

amount * 100;
100%100

is that it? Reply by Joe_32
Member Avatar
Topic by Joe_32 in Programming
c++
For cents multiply by 100 and take modulo 100 Reply by ddanbe
Member Avatar
Hi good day.. i need your help with my exercises..
i need to know how to compute the cents.. in any given amount.. in denominations.. for C programming
Thanks..

Given amount : 1886.25

if (amount>=1000)

x = amount / 1000;
amount % 1000;
printf("%d",&x);

Answer is : 1

but for … Topic by Joe_32 in Programming
c++
Member Avatar
Featured rproffitt 868 Gave Reputation to pty in How to read online text file
Topic by Mr.M in Software Development
c++
Easy to forget how much power you have with the Unix toolbelt at your fingertips.

![Screen_Shot_2017-08-21_at_15_49_23.png](/attachments/large/0/4ef22f2c98e5999150e2ca7b9f168354.png) Reply by pty
Member Avatar
Joe_32 Joined the Community
Member Avatar
Featured pty 292 Replied To a Post in How to read online text file
Topic by Mr.M in Software Development
c++
Easy to forget how much power you have with the Unix toolbelt at your fingertips.

![Screen_Shot_2017-08-21_at_15_49_23.png](/attachments/large/0/4ef22f2c98e5999150e2ca7b9f168354.png) Reply by pty
Member Avatar
Featured Reverend Jim 1,850 Replied To a Post in Sort Images in Folders
Topic by Stefan_1 in Microsoft Windows
Glad to help. Reply by Reverend Jim
Member Avatar
Featured Stefan_1 52 Marked Solved Status for Sort Images in Folders
Hello there :), i have bunch of pictures which the title is like this `Name-LastName-year-category-....` what i want to do is sort them all in folders which will have only their `Name-LastName` and all pics with that name go in that folder. Is there some tool for this job to … Topic by Stefan_1 in Microsoft Windows
Member Avatar
Featured Stefan_1 52 Replied To a Post in Sort Images in Folders
Topic by Stefan_1 in Microsoft Windows
Since i didnt know the scripting language i downloaded program and added suffix at the end `-asd` and with that i made all images titles `a-b-c.jpg` and runned the script. The script finished its job great! Thank you, you two @rproffitt @Reverend Jim :) Reply by Stefan_1
Member Avatar
Featured Reverend Jim 1,850 Replied To a Post in Sort Images in Folders
Topic by Stefan_1 in Microsoft Windows
Let me get back to you with the `a-b.jpeg` variant. The above code won't handle that yet. Before I do that, how does the other file name work? According to your original spec, this allows for something like

john-doe.jpg

Basically, only one file per person. How many files of this … Reply by Reverend Jim
Member Avatar
Featured Reverend Jim 1,850 Replied To a Post in Sort Images in Folders
Topic by Stefan_1 in Microsoft Windows
>when i dubleclick the sortfiles.vbs exactly nothing happens

That's because you didn't read the instructions. I told you to run it by

cscript sortfiles.vbs

Apparently I was unclear in that you do this from the command line. vbScript files are executed by either `cscript.exe` (console) or `wscript.exe` (window). The default … Reply by Reverend Jim
Member Avatar
Featured rproffitt 868 Replied To a Post in Sort Images in Folders
Topic by Stefan_1 in Microsoft Windows
@Stefen, while I see how, you must dig in a little here as your files, your responsibility. Blindly using scripts is something I don't advise.

Did you notice this line?
` if Ubound(flds) >= 2 Then

That section could be changed to just > 2 and then you could copy … Reply by rproffitt
Member Avatar
Featured Stefan_1 52 Replied To a Post in Sort Images in Folders
Topic by Stefan_1 in Microsoft Windows
Okay i got it, but it sems like i have titles with just `a-b.jpeg` is it possible to process like that also ? Reply by Stefan_1
Member Avatar
Featured Mr.M 32 Replied To a Post in How to read online text file
Topic by Mr.M in Software Development
c++
@Thines01. I've tested your code and it does retrieve the data, but the issue that I'm having now is that on my other code that read a file on a local system uses a `getline` and `.find`, `npos` to find the specific data from the file but now I can't … Reply by Mr.M
Member Avatar
Featured rproffitt 868 Replied To a Post in Sort Images in Folders
Topic by Stefan_1 in Microsoft Windows
@Stefan. If you don't want the echo's, read https://ss64.com/vb/echo.html to either set them to not be interactive or comment, remove as you see fit. Reply by rproffitt
Member Avatar
Topic by Var_1 in Programming
Nobody's going to try and decipher/run all that code. What exactly is the problem? Try creating a [JSFiddle](https://jsfiddle.net/) or something. Reply by pty
Member Avatar
Topic by Royal_3 in Web Development
Why are you mixing PHP and Javascript up like that? And why are you using `document.getElementByID`? Also, putting spaces in `id` attributes [is invalid](https://developer.mozilla.org/en/docs/Web/HTML/Global_attributes/id).

Clue, just use PHP for this, perhaps a case statement:



switch (true) {
case $count <= 6:
$trend = 'super-hot';
break;

case $count <= 4:
$trend … Reply by pty
Member Avatar
hi admin or others i want to use this script to display trading comment with number of comment in post eg 54=”veryhot” please check this script and correct error thanks





<script>

function myFunction()
{
var count = <?php echo $comment_num; ?>;
if (count>=10) { document.getElementById( "Trending!!" );}
else if ( … Topic by Royal_3 in Web Development
Member Avatar
Featured Stefan_1 52 Replied To a Post in Sort Images in Folders
Topic by Stefan_1 in Microsoft Windows
Yes the file `sortfiles.vbs` is placed in the folder where all the images are. BTW when i dubleclick the `sortfiles.vbs` exactly nothing happens, i doesn't get command windows open and no folder is created. Maybe am doing something wrong or i have to install something to run this script?

**EDIT:** … Reply by Stefan_1
Member Avatar
Royal_3 Joined the Community
Member Avatar
Featured Reverend Jim 1,850 Replied To a Post in Sort Images in Folders
Topic by Stefan_1 in Microsoft Windows
The script looks at all jpg files in the folder. If the file name has at least three fields separated by "-" then it creates a folder name from the first two fields and moves the file. In other words, it will process

a-b-c.jpg
a-b-c-d.jpg
a-b-c-d-e.jpg
etc

but not

a-b.jpg … Reply by Reverend Jim
Member Avatar
Iswarya_1 Joined the Community
Member Avatar
Featured Stefan_1 52 Replied To a Post in Sort Images in Folders
Topic by Stefan_1 in Microsoft Windows
I created .txt file named `sortfiles` saved the code inside it and renamed to `sortfiles.vbs` the file sortfiles.vbs has created, I have runed it but nothing happens. Will the code proceed working if there are some images not containing the same order of images title? Reply by Stefan_1
Member Avatar
Doctor_1 Joined the Community
Member Avatar
Featured Reverend Jim 1,850 Replied To a Post in Sort Images in Folders
Topic by Stefan_1 in Microsoft Windows
I don't normaly just provide code but

1. It's pretty simple
1. I'm really bored

Copy the following code into a file named `SortFiles.vbs` in the same folder containing your images. If you run it by

cscript sortfiles.vbs

the script will create the required folders under the current folder and … Reply by Reverend Jim
Member Avatar
Featured Mr.M 32 Replied To a Post in How to read online text file
Topic by Mr.M in Software Development
c++
@Thines01. Thank you for that and it look like its what I'm looking for indeed. To mention I'm using Microsoft Visual C++ 2010 under the Microsoft Visual Studio 2010 IDE, and the project is a GUI (CLI) application. My out comes with the boost is that it worked fine with … Reply by Mr.M