Forum Replies Created

Ganesh Member

I have been looking at raspberry pi for a long time but never had an interest in investing in one because I was never in a program that would require such a device but now its very lucrative and I wanna have the best projects for school so I shall invest in this. I bet you can do all sorts of amazing things with that and Arduino as you said.

I clicked on the sub link for the Object Oriented Programming and this is what it says, well I have a lot of faith in this university because its a state school and not those for profit scams it has a few private schools that offers Degrees here but they offer stuff that can’t even get you a good Job. But this is the most info I can get in these courses one girl said over the phone they teach us Java and C++ so I am going to start focusing on that from now so I can be ahead of most people when semester starts

http://u.tt/utt_programme_courses_pop_up.php?utt_programme_course_key=16

OBPR210B - Object-Oriented Programming: 6 Credits

This course introduces the student to problem solving and object-oriented programming using Java with a strong emphasis on proper programme design. Topics include software development life cycle, object-oriented design concepts (e.g. classes, attributes, methods, inheritance, polymorphism), selection and repetition structures, libraries, arrays, strings and other advanced object-oriented concepts.

and then there is this one

PROG110B - Computer Programming I: 3 Credits

This course deals with the fundamental elements of programming in the C/C+ environment. The basic principles of software engineering including structure decomposition, documentation, testing and debugging are discussed. Basic programme elements such as variable types, control structures (including sequence, decision making and looping), subroutines and functions are discussed. MATLAB is also introduced for the purpose of solving some intricate engineering problems. Exercises and assignments deal mainly with mathematical and engineering constructs.

Ganesh Member

It’s good to have a few test devices anyway. I tend to get old phones from friends and family when they upgrade for cheap lol. Sometimes everything will work fine in the emulator, but on device a it crashes. Or it’ll work in the emulator and on device a, but it crashes on device b.

Ganesh Member

I basically started back in the day with batch scripting and VBScript. Now I mostly use C# and PowerShell now.

I found with programming it’s best to just find something you want to do and try it. You will fail again and again and then you’ll start getting it a little bit at of time. Once you learn a little bit, you’ll want to learn more and try new things. Along the way use books as reference and don’t pick up any bad habits. My boss is always giving me projects to do and if I can create a script over doing something manually, I will do it even if it may take longer to figure it out, because once you learn the technique you can apply it again and again.

Also, post your questions on the forums. So many people are willing to help. Stackoverflow and MSDN forums are great. I usually post something once a week, because there is always something new to learn. We all get stuck.

Ganesh Member

I started programming because my thesis subject was to develop a tool for engineers. I used Visual Basic .NET and what really helped me was the Book “Teach yourself VB. BET 2010 in 24 hours” by James Foxall (Sams publishing) and the website TheNewBoston.org. Until then I didn’t have any programming background, except for a class we did in Matlab during my engineering studies.

Ok I am not a guru now, I’ m still in the very beginning, but I did what I wanted to do for my thesis and it turned out to be great!

I am sure there are hundreds of great resources out there for learning programming, but I think that the learning process is up to the individual. Whatever floats your boat.

Ganesh Member

I agree with you about TheNewBoston channel. He teaching isn’t that good. But for basics and to get an idea of it, it’s a good place to start.

I am still very new to programming. I was gonna learn it this year but I changed to Business.

I plan to learn it myself at home by buying good books.

in reply to: Math calculation PHP
Ganesh Member

A little more clarification as to why it’s not working as it is supposed to :






 
Your Population:



in your test.php variables from the form are submitted as GET , and as rgman already pointed out, you attempt to retrieve the value of POST vars … and those are empty

Ganesh Member

How I do mysqli:

$mysqli = new mysqli("localhost", "databaseuser", "databasepass", "database");   //<<< FIX THIS TO YOUR INFO
$sql = "SELECT * FROM databasetablehere WHERE id='$recordid'";
if(!$result = $mysqli->query($sql)){
    die('There was an error running the query [' . $mysqli->error . ']');
}
else
{
while($row = $result->fetch_assoc()){
$user_id = $row['user_id'];
$anothercolumn = $row['column2'];

}
}
$mysqli->close();

Easy stuff, get the info, do your if statement logic to check returned vars

Ganesh Member

in order to become a programmer, you have to learn to use google for finding the answers you need.
That’s the first thing you need to learn.

If you have a label called label1 then:

to hide it: label1.Visible = False;
to show it: label1.Visible = True;
Ganesh Member

most likely it is protected by DRM :

http://en.wikipedia.org/wiki/Digital_rights_management

if you bought a video / movie, then chances are 99.9999999999 % that you will find it here …. just search a little more thorough.

Ganesh Member

The tables are small both in record count and size.

Caching would really not offer much improvement, so to avoid the hassle of clearing the cache (and remembering to do so) when you do make a change to the db, I wouldn’t bother caching.

Ganesh Member

If you are new to C# I wouldn’t recommend create your own.Why don’t you add the Windows Media Player control? It’s built in. See link below.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd564585(v=vs.85).aspx

Do you want to be able to select files to play? You can always add a menu to your app 'File>Open'

Follow the link above and then add the MediaPlayer, a MenuStrip with a File>Open menu to your form.

Then add the following code to the form matching the control names you have added (they should be the same if you kept the default). Obviously, you need to add error checking and logic for the user interface.

public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

        }

        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "Video Files(*.WMV;*.AVI;*.MP4)|*.WMV;*.AVI;*.MP4";
            ofd.ShowDialog();
            axWindowsMediaPlayer1.URL = ofd.FileName;
        }
    }

Link to the Windows Media Player SDK which gives way more control of the player.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd758070(v=vs.85).aspx

Ganesh Member

When we click on “show password” button nothing happens. We don’t get email either. Very weird. Could be a plugin interfering?

Ganesh Member

I would wonder if what you did was:

a) Ran the original code
b) Modified the code to unroll the loop
c) Ran the modified code and noticed it was faster

But really what happened was that between (a) and (c) was that the database cached the query, so it responded much faster than on the first call.

Why would that seem more likely?

Because the time it takes to call to a database is hugely (many orders of magnitude) longer than it should take to run through a loop to get the data from the response. Think of what is happening when you make that call to the database? First, you need to get a connection to the database, then send the query over that, then the database parses it, analyzes the query, scans the table, collects up the data from disk, encodes that data for transmission, sends it over the socket where it is decoded by the client (the Java) app.

Then you run a simple for loop to extract it.

The for loop shouldn’t be a factor in the timing.

Your first idea (using multiple connections to each get a piece of the data) might help and is possible. You’d just break up the query into sections. It might also make it run slower overall, but it would certainly be doing different work and might boost things.

Unrolling the loop should make no measurable difference.

Ganesh Member

Well you still haven’t revealed how you plan to instantiate the two classes (identical constructors? or different ones?)

Anyway, now it’s easier to understand.

If you have to stick with the class names then you can (and should!) un-nest the identical classes and keep the UserCredentials classes nested deep.

I don’t have experience with JSON annotation but there are nice tutorials that point you to the proper direction.

The following link is not about annotations but shows you how json classes should be implemented:
http://www.tutorialspoint.com/json/json_java_example.htm

The following uses XML annotations:
http://stackoverflow.com/questions/11001458/json-java-object-to-json

And there are many more.

So instantiating is, likely, you invoke the deserializer of your choice with a JSON string… or create the object manually, whichever you like.
If you need some behaviour that works both with host (having UserNamePassword) and guest (having FirstLastNameEmail) then you have to interface them. Something like:

public interface UCInterface {
  void setCred(String s1, String s2, String s3);
  Object getCred();
}

public class UserCredentials implements UCInterface {
  ...

  public void setCred(String s1, String s2, String s3) {
    UserNamePassword.UserName = s1;
    UserNamePassword.Password = s1;
    UserNamePassword.PasswordEncryptionType = Integer.parseInt(s3);
  }
  public Object getCred() {
    return UserNamePassword;
  }
}

Similar for Guest (but you don’t even need parseInt here)
Note that I haven’t tested, not even compiled the code above so it may bleed for several wounds but may give you an idea…

Thereafter, whenever you want to manipulate that object, be it host or guest, you can invoke setCred and getCred, accordingly.

Ganesh Member

The easiest way, imo, would be to call the PDFtk Server from your VB code. The PDF Toolkit (PDFtk) is an excellent (free!) product that has numerous features to manipulate PDFs. It comes in both command line and GUI versions. The command line version is called PDFtk Server and may be downloaded here:

http://www.pdflabs.com/tools/pdftk-server/

Don’t be misled by “Server” in the name. I don’t know why they called it that, but it’s just an executable (pdftk.exe, with a supporting DLL, libiconv2.dll) that runs on XP, Vista, W7, and W8 (I tested it on W10 Pro 64-bit and it worked fine, but I don’t think it is officially certified yet for W10). That is, it does not have to run on a “server” OS.

The operation to split a PDF into separate pages is called burst. You may learn about it here:
https://www.pdflabs.com/docs/pdftk-man-page/#dest-op-burst

> our App needs separate pages

So here’s the one-line command to split your large PDF into separate pages:

pdftk in.pdf burst

By default, the separate pages will be named pg_xxxx.pdf (where xxxx is the page number, such as pg_0001, pg_0002, etc.). If you prefer to create different file names, use the output option, such as:

pdftk in.pdf burst output separate%02d.pdf

That will create files called separate01.pdf, separate02.pdf, etc.

The burst operation also creates a file called doc_data.txt that contains a lot of metadata from the source file. The content of the file is described in the dump_data operation:

https://www.pdflabs.com/docs/pdftk-man-page/#dest-op-dump-data

Viewing 15 posts - 31 through 45 (of 63 total)
en_USEnglish