199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for ddanbe

I recently came accross this code: Mat3D R_z(double RotAngle) { const double S = sin (RotAngle); const double C = cos (RotAngle); Mat3D U; U.m_Mat[0][0] = +C; U.m_Mat[0][1] = +S; U.m_Mat[0][2] = 0.0; U.m_Mat[1][0] = -S; U.m_Mat[1][1] = +C; U.m_Mat[1][2] = 0.0; U.m_Mat[2][0] = 0.0; U.m_Mat[2][1] = 0.0; U.m_Mat[2][2] = …

Member Avatar for ipswitch
0
442
Member Avatar for Mahnoor_1

I'm working on exception handling. Here is my code, I need some help.. Requirements: => If the user push a value to stack when stack is full,it must throw an exception of type "cInvalidPush". => If the user pop a value from stack when stack is empty , it must …

Member Avatar for ipswitch
0
372
Member Avatar for altjen

Im using this code to get image from SQLITE try{ String sql = "SELECT Photo FROM Pics WHERE InvoiceNumber=?"; pst = conn.prepareStatement(sql); rs=pst.executeQuery(); if(rs.next()){ byte[]imagedata = rs.getBytes("Photo"); format = new ImageIcon(imagedata); ImIc.setIcon(format); } }catch(Exception e){ JOptionPane.showMessageDialog(null, e); } `private ImageIcon format = null;` String filename = null; int s=0; byte[] …

Member Avatar for altjen
0
192
Member Avatar for Dhana_1

a robot is programmed to move forward 'F' meters and backwards again say 'B' meters in a straight line .the robt covers 1 meter in T units of time on robot path there is a ditch at a distance FD from intial oposition in forward direction as well as a …

Member Avatar for rproffitt
0
171
Member Avatar for Hilal2009

The following on the attachment below are the page feeds with its comments returned by facebook PHP sdk and Graph API. What I want here is to get number of comments per user on each feed. Here are the codes $helper=new FacebookRedirectLoginHelper($url); try{ $session=$helper->getSessionFromRedirect(); if(isset($session)) { $request=(new FacebookRequest($session,"GET","/357971644373038/feed"))->execute()->getGraphObject()->asArray(); $comment=$request["data"]; $counter=count($comment,1); …

Member Avatar for pritaeas
0
398
Member Avatar for ramsiva

newTextBoxDiv.after().html('<div id="hoteldiv' + counter + '">'+'<input type="text" name="tripdetails[0][hoteldetails][' + counter + '][name]" id="textbox' + counter + '" value="" >'+ '<input type="text" name="tripdetails[0][hoteldetails][' + counter + '][number]" id="textbox' + counter + '" value="" >'+ '<input type="text" name="tripdetails[0][hoteldetails][' + counter + '][address]" id="textbox' + counter + '" value="" >'+'<br><br>'+ '<input type="text" name="tripdetails[0][hoteldetails][0][contact][' …

Member Avatar for ihelpyou
0
275
Member Avatar for Darth Vader

Hello, I wonder how we can use lock objects between 2 different applications. In the example below we can use lock objects to let only one thread to execute the code inside the lock object at a time. This works fine within one application. Now I wonder how we can …

Member Avatar for JamesCherrill
0
307
Member Avatar for divinity02

Hi j I have a question and I am wondering if it can be answered. the question is, how do you calculate a teaching allowance and nis from the hours of work and rate of pay in java.

Member Avatar for JamesCherrill
0
191
Member Avatar for OtepTheThird

Hi Php'ers, I'm new to Php. I have some issues INSERTING date to MySQL by PHP. here's my code snippet: //date format $date1 = mysqli_real_escape_string($_POST['j_avail']); $d1 = date('Y-m-d',($date1)); $date2 = mysqli_real_escape_string($_POST['j_expir']); $d2 = date('Y-m-d',($date2)); the query: $sql = "INSERT INTO table (....,j_avail,j_expir) VALUES (....,'$d1','$d2')"; the HTML: <td id="ititle">Availability :</td> <td><input …

Member Avatar for Hilal2009
0
11K
Member Avatar for lewashby

At my current job me and the rest of the staff that work in my area are uisng a lot of files that when opened look like PDF files but there not. They're actually .exe files and the the program that opens them is called Omni Form Mailable Filler. I've …

Member Avatar for Gribouillis
0
474
Member Avatar for myk45

Hi All, I am trying some experiments with pthread scheduling policies. I have a couple of apps and within all these apps, I set the thread policy to SCHED_RR and I set the priority to MAX - 1. Now, I see that the CPU utilization as reported by top for …

Member Avatar for iš_iš_iš
0
240
Member Avatar for altjen

this is the code I create to import pics select image: JFileChooser chooser = new JFileChooser(); chooser.showOpenDialog(null); File f = chooser.getSelectedFile(); filename = f.getAbsolutePath(); file_picker1.setText(filename); try{ File image = new File (filename); FileInputStream fis = new FileInputStream(filename); ByteArrayOutputStream bos = new ByteArrayOutputStream(); byte[] buf = new byte[1024]; for (int readNum; …

Member Avatar for jwenting
0
248
Member Avatar for nathan.pavlovsky

Hi all! Whenever I am working with my code in my main.cpp file, I can call character-handling functions like * isdigit * isalpha * isspace * toupper without importing the `cctype` library. However, my C++ How to Program Book shows that the cctype library must be imported before the functions …

Member Avatar for nathan.pavlovsky
0
263
Member Avatar for computer_man

How do I import some values from .txt files to a VB.NET DataGridView and then store them on a SQL database? I don't need all file values. I don't know how to get words after ; or ;;; or 1 SPACE or 3 spaces, and after the loop is finished …

Member Avatar for zelrick
0
905
Member Avatar for BustACode

I found that one can use dictionaries to hold Tkinter widget config and display parameters. This then permits one to have these dictionaries elsewhere in the code for easy modification instead of buried within the code for each widget. I particularly like to place these dictionaries toward the top of …

0
3K
Member Avatar for BustACode

I have been learning NumPy arrays/matrices in Python. As I worked, I found that I desired a more readable form of 3d matrices. So I figured that writing one would be a good goal and learning exercise. The goal was to create a function that would print 3d NumPy matrices …

0
3K
Member Avatar for sfiso27
Member Avatar for Christopher_12

i need some help concerning the encryption and decryption i have a login table on my microsoft sql server 2012 but i want to do the encryption and decryption remember i have 5 departments and i want to direct each username and password to a specific department form that i …

Member Avatar for tarunap
0
2K
Member Avatar for neam

hi:) can you help me on my project .. what features can add on a security system ?

Member Avatar for neam
0
98
Member Avatar for Parvathiapril8

can anyone explain the meaning of Void in java..even though i referred many books,not able to understand clear as i am a learner..

Member Avatar for JamesCherrill
0
242
Member Avatar for shany0786

function getImage() { $session_data = $this->session->userdata('sessiondata'); $id = $session_data['user_id']; $this->db->where('user_id',$id); $r=$this->db->get('tbl_usrs'); if($r->num_rows()>0) { foreach ($r -> result_array() as $row) { $data[] = $row; } } $r->free_result(); return $data; //print_r($data); }} //class ends hello everone i am new to php codeigniter while displaying image from database i am getting error Severity: …

Member Avatar for cereal
0
171
Member Avatar for Slavi

Hey guys, I am looking into xbrl files and I need to extract certain data from each of them however, I can't find much information on the existing python-xbrl library, perhaps someone in here has an experience with it? Here's an xbrl file example [Click Here](http://regnskaber.virk.dk/14502803/eGJybHN0b3JlOi8vWC1GMDk4RkNDNi0yMDE0MTIzMV8wOTE2MjFfMDk1L3hicmw.xml) Any ideas/solutions on how …

Member Avatar for megaflo
0
2K
Member Avatar for Iamateur

I have added form1 and on it 2 text boxes. text box1 to accept fromdate and textbox2 to accept todate. After this,I added Crystal report from Add new Item. Then in Crystal report I added table and its columns. After that I wrote code behind form1. The code is not …

Member Avatar for Oheneba Kwadwo
0
2K
Member Avatar for sonlamhpu

Dear brother Sorry for my bad english Please help me in this case I import with big data to Datagridview It's take long time, and i want to using progessbar for wait I try to do this But it's seem not good Please help me Thank you so much! `Inline …

Member Avatar for Reverend Jim
0
1K
Member Avatar for kannasekar

Hi to all. I am a newbie to PHP programming. In my project I'm having a student registration form. In that page I've populated checkboxes from database values for students who wants to enroll more than one classes. Everything got done. Now I need to give edit option to student …

Member Avatar for kannasekar
0
187
Member Avatar for anmol.raghuvanshi1

I get sick in finding error in my code i want to display a image from database having field profile_picture which has value like upload/large/imagename.jpg but i can't able to display it main thing is nothing is printed when i echo or print from controller when i view page source …

Member Avatar for anmol.raghuvanshi1
0
186
Member Avatar for adebayo23

Hello, Please as at this morning everything was fine, but all of a sudden all data record wiped off from 3tables in my database, now my client can't find records. Am using MYSQL, Visual Basic. Thanks.

Member Avatar for cereal
0
255
Member Avatar for davidjennings

Good day to you all, I ham having an issue the the following error (Fatal error: Call to a member function fetch_result() on a non-object in on line 167) which is the while ($row = $result->fetch_object()) every way I try to change this another error crops up. If yo can …

Member Avatar for davidjennings
0
1K
Member Avatar for achava

As part of a class in Java, the constuctor is supposed to throw a java.lang.IllegalArgumentException exception when an integer that is a field in the class, let's call it int N, is set to a negative vale. How do I set this up?

Member Avatar for achava
0
218
Member Avatar for Violet_82

Hi all, does anybody know of any good guide for beginners to write twitter bots? I had a look around but I couldn't find anything terribly good. Does anybody have any suggestion, something that starts building very simple bots thanks

0
67
Member Avatar for Aabir

#include<iostream.h> #include<conio.h> int main(void) { void hello() { cout<<"HI"; } getch(); return 0; } I am getting an error at line 6 stating that declarartion syntax error. What do I do?

Member Avatar for NathanOliver
0
511
Member Avatar for Violet_82

Hi guys, I've run into something interesting and I'm a bit stumped with this. Basically I have a form: <form> <div class="formWrapper"> <span>Refine your search</span> <input type="text"> <select> <option>English</option> <option>French</option> <option>Dutch</option> </select> <button class="submitButton" type="submit" data-ajaxurl="http://localhost/_myFile.html" data-ajaxtarget="#myFile_search" >Search</button> </div> </form> and some bootstrap pagination links: <div class="bootstrap_pagination"> <ul> <li class="active"> …

0
130
Member Avatar for sneekula

In the last couple of threads people have used the Python class, but really don't seem to know how to use them properly, or why to use them. Hence my question: "Why would you use a class in Python?" I though only Java forces you to use OOP.

Member Avatar for Vineetha_1
0
4K
Member Avatar for Seth_1

Okay so let me start by saying I have a pretty decent c++ base and very advanced logic skills. So whatever help you will have to provide will probably be minimal. So here's my problem: I've been trying to figure out the best way to organize all my Magic: The …

Member Avatar for David W
0
147
Member Avatar for Munazza_1

Respected members, I have this code chunk that should read multiple text files from a folder. I am later calculating their probability. For one file it is working fine and methods are also showing output. The first code is for ONE FILE named as English.txt. BufferedReader reader = new BufferedReader(new …

Member Avatar for JamesCherrill
0
2K
Member Avatar for fputs

How do you implement the open/close system calls on linux using C? What go's into the open file table? How do you create file's and delete file's?

Member Avatar for David W
0
198
Member Avatar for altjen

try{ String b = jTextField1.getText(); String sql = "SELECT * FROM DataImput ORDER BY InvoiceNumber=?"; pst=conn.prepareStatement(sql); pst.setString(1, b); rs=pst.executeQuery(); jTable1.setModel(DbUtils.resultSetToTableModel(rs)); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } finally{ try{ rs.close(); pst.close(); } catch(Exception e){ } } } this is the code I work to search. it actually work. but really weird. …

Member Avatar for stultuske
0
145
Member Avatar for hwoarang69

I set up a servlet project in eclipse and I am trying to connect a Access databasae(Ucanaccess) with it. By looking at below error, its look like I am missing jar files but if you take a look at attchement image. You will see all my jar files are in …

Member Avatar for jwenting
0
2K
Member Avatar for hwoarang69

User will enter a date, for example "7/1/2015". Than I will check in database and return some result if match. Note in database there is data/Time but user will enter only date. Below I have a following database set up Table = "workStartTable" |----|------------------------| | ID | StartBy | |----|------------------------| …

Member Avatar for Hardz
0
219
Member Avatar for Jazerix

[CODE]using System; using System.Security.Cryptography; using System.Text; public static class Encryption { public static string Encrypt(string input, string key) { byte[] inputArray = UTF8Encoding.UTF8.GetBytes(input); TripleDESCryptoServiceProvider tripleDES = new TripleDESCryptoServiceProvider(); tripleDES.Key = UTF8Encoding.UTF8.GetBytes(key); tripleDES.Mode = CipherMode.ECB; tripleDES.Padding = PaddingMode.PKCS7; ICryptoTransform cTransform = tripleDES.CreateEncryptor(); byte[] resultArray = cTransform.TransformFinalBlock(inputArray, 0, inputArray.Length); tripleDES.Clear(); return Convert.ToBase64String(resultArray, …

Member Avatar for hunny1
0
9K
Member Avatar for mark103

Hey guys, I need some help with my code, I have a trouble with checking on two different strings as I want to check if the string in the variable `$program_times` are equal to `PM` and `$next_program_times` are equal to `AM`. When I try it, it will show nothing and …

Member Avatar for cereal
0
151
Member Avatar for shanenin

I am trying to get in the habit of practicing coding on daily basis. I decided to try do do tic tac toe in powershell. This took my a rediculous amount of hours to finsh. I am glad to be done. Nest projec will be something more useful like automating …

Member Avatar for Nutster
0
1K
Member Avatar for kannasekar

Hi Everyone, I am a newbie to PHP programming. I just need to update the status when user click delete button. Here is the piece of code that I tried. When I echo the values of $mode and $id it prints properly. But the update query block doesn't working. <?php …

Member Avatar for kannasekar
0
475
Member Avatar for Stefce

Hello i have three colums which i want to make users can upload pictures/videos and automaticly to add to one of the colums but i cannot figure out how to do that... here is the HTML code i have <div class="main"> <div class="row"> <div class="col-md-3"> <div class="panel panel-default"> <div class="panel-body"> …

Member Avatar for pritaeas
0
182
Member Avatar for anmol.raghuvanshi1

hello, I want to store image path in database along with image name like /uploads/profilepic/name.jpg. what happening is only path is beinged saved not image name like field in my table prfile_picture has updated /uploads/profilepic/ but i want image name also after trailing slash so that i can retrieve that …

0
128
Member Avatar for Susan_4

Good day, I am a PHP beginner, but have managed to set up a shopping cart on my jewelry website (with the help of video tutorials found online). Everything is working well, but I need to add a text box to my product page where people can add the engraving …

Member Avatar for Susan_4
0
918
Member Avatar for Saboor880

Hi Friends. I am facing Microsoft ODBC Driver error at run time in my program. I am using window 7, jdk 7 and Ms Access 2007. I am using "jdbc:odbc:JdbcOdbcDriver". I am giving code and error message below. Please tell me solution of this problem import java.sql.*; public class JdbcDMLEx2 …

Member Avatar for JamesCherrill
0
281
Member Avatar for James_43

Hi Guys, As part of an online store, I have a dropdown box where the user selects a size. If the user selects size L then the 'add to cart' button needs to link to a page different than if the user selected size M. I figured out that I …

Member Avatar for James_43
0
306
Member Avatar for Mike_25

Hi there, I have have a challenge with my application. I am developing it using VB.Net and SQL server 2014. My database contains 2k plus records. I used to search and return the results very fast when the database was still small. The problem now is that whenever i try …

Member Avatar for Mike_25
0
198
Member Avatar for anmol.raghuvanshi1

hello,everyone i am trying to access user id from database in session data but no success till now?? //Controller function upload() { $user_id = $this->session->userdata('user_id'); //set preferences $config['remove_spaces']=TRUE; $config['encrypt_name'] = TRUE; // for encrypting the name $config['upload_path'] = './upload/'; $config['allowed_types'] = 'jpg|png|gif'; $config['max_size'] = '10248'; //load upload class library $this->load->library('upload', …

Member Avatar for lps
0
2K

The End.