64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for glao

Hello , I have the following code: count = 0 phrase = "hello, world" for iteration in range(5): index = 0 while index < len(phrase): count += 1 index += 1 print "index: " +str(index) print "Iteration " + str(iteration) + "; count is: " + str(count) I can't understand …

Member Avatar for glao
0
269
Member Avatar for HunainHafeez

actual differecne between SQL Server's STORE PROCEDURES and USER DEFINED FUNCTIONS ? i looked up these in google but couldn't satisfy me. Differences ? better to use ? and why does UDF can only implement SELECT statements not else , y ?

Member Avatar for HunainHafeez
1
184
Member Avatar for cambalinho
Member Avatar for WoW Me Web Girl

here are the questions i was asked.. Please help Im a little confussed. 6.Describe (3-4 sentences) what this statement does: ("this is foo bar".match(/o/g)||[]).length 7.Write a JavaScript function that takes in a DOM element and returns a count of the number of <a> tags contained within that element (first level …

Member Avatar for WoW Me Web Girl
0
174
Member Avatar for raidenx44

I'm working on my capstone project. I really having a bad time thinking for the correct query for the search button function. VB.Net 2008 is my front end while I'm using MySQL as my back end database. Private Sub BtnSearch_Material_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSearch_Material.Click Try …

Member Avatar for raidenx44
0
313
Member Avatar for cereal

Hello, so I was trying few relations between tables and I noted an unexpected behaviour when using `group_concat()`. Let say I have three tables: fruits, fruitstock and fruitprices. These are the structures: create table fruits ( id tinyint unsigned not null auto_increment primary key, name varchar(50) not null, quality varchar(50) …

Member Avatar for cereal
1
4K
Member Avatar for Indians

this is my html and javascript coding. how to do contenteditable div onkeyup calculation. i tried it but i doesn't work... <td><div class="inputclass" id="quantity1" contenteditable> </div></td> <td><div class="inputclass" id="unitprice1" onkeyup="maths();" contenteditable> </div></td> <td><div class="inputclass" id="total1" contenteditable> </div></td> function maths() { var qt = document.getElementById("quantity1").value; var up = document.getElementById("unitprice1").value; qtup = …

Member Avatar for minitauros
0
1K
Member Avatar for krystosan

Is there any way to start an application with python and count how much time does it take to completely load, any idea if I can do it with os.syste, or subprocess.Popen ?

Member Avatar for germ
0
275
Member Avatar for ehpratah

Good Day Guys Im Having a hardtime getting this simple script working, basically im trying to open pop up windows when a link is click(which work fine until i found out that the same data is being fetch over and over again which is the last data inserted in the …

Member Avatar for ehpratah
0
207
Member Avatar for patk570

Hello everyone, I have a table that i want to limit to 10 results per page and have a simple pagination script to generate the next 10 results. I have tried many different options, but alas it does not work. here is what I have so far. <tbody> <? //specify …

Member Avatar for patk570
0
176
Member Avatar for Labdabeta

Hello, I am wondering how libraries create graphics contexts in a cross-platform manner. Somehow libraries like SDL create graphical windows seemingly without using the system headers. I know how to set up a window for graphics using Win32API, and how to get input from it using the same. How do …

Member Avatar for Labdabeta
0
355
Member Avatar for HunainHafeez

ALTER FUNCTION [dbo].[customers_udfMin2] ( @decission tinyint ) RETURNS int AS BEGIN -- Declare the return variable here DECLARE @min int Declare @default int = 10 -- Add the T-SQL statements to compute the return value here if (@decission = 1) Begin SELECT @min = MIN(customers.cus_id) from customers End else RETURN …

Member Avatar for HunainHafeez
0
495
Member Avatar for João_5

Ok, new question... I need to get data from one mysql row, set it as $ad The following code will convert it to readable date format. <?php function adConvert ($ad) { $seconds_ad = $ad / (10000000); //86400 -- seconds in 1 day $unix = ((1970-1601) * 365 - 3 + …

Member Avatar for João_5
0
309
Member Avatar for HunainHafeez

names of web development certifications ? i have to fill a form for certification, in drop down they only mentioned WEB development and left the box to be filled by applicant so what should i write ? i'm interested in asp.net(C#) etc but tell em all popular web certification names …

Member Avatar for HunainHafeez
0
234
Member Avatar for hulkishungry

Hey, there isn't really a general forum that I was trying to post this is, so I've had to stick it in the "most" relevant forum that is avaialble. I've been at uni for two years now and I still haven't found something that I'm particularly good at. I thought …

Member Avatar for hulkishungry
0
170
Member Avatar for Labdabeta

Hello, I noticed that in c++ everything that can be done using a static function in a class could be done by using a public function in the same namespace. Assuming that you bind your classes in a namespace these functions do not take up names in the global namespace. …

Member Avatar for mike_2000_17
0
204
Member Avatar for humorouscheese

This is my first full sized c# project, so I apologize if the answer if the answer here was obvious. I've got a program that runs a method called firstrun, which is called at the point that the form loads (if a value from a file is true). This method …

Member Avatar for tinstaafl
0
240
Member Avatar for LucyLogic

Hello, everyone. I am taking a beginning python class and was wondering if anyone could help me out? We are writing a program that generates 100 random numbers (between 1 and 1000), and keeps a count of how many of those random numbers are even and how many are odd. …

Member Avatar for vegaseat
0
510
Member Avatar for CodingCabbage

Sorry, I posted this in software development not python. How do i make an auto-incrementing column? Heres my pseudocode/sql attempt c.execute('''CREATE TABLE <tableName> ( <columnName> <auto incrementing??!!>, <columnName2> text, <columnName3> text, <columnName4> text ) ''')

Member Avatar for vegaseat
0
615
Member Avatar for cambalinho

template <typename a, typename ... b> class events { public: typedef std::function<void( a arg, b ... argx)> OnSomethingHandler; events(OnSomethingHandler Handler) { handlers_.push_back(Handler); } void operator ()() { for(auto i = handlers_.begin(); i != handlers_.end(); ++i) (*i)(); } private: std::vector<OnSomethingHandler> handlers_; void AddHandler(OnSomethingHandler Handler) { handlers_.push_back(Handler); } void TriggerEvents() { for(auto …

Member Avatar for cambalinho
0
794
Member Avatar for mavtcr
Member Avatar for G_Waddell
0
969
Member Avatar for castajiz_2

for (;n!=0;n/=10) { do something till n==0; } Is this something like a while loop or do while loop or some kind of imitation?

Member Avatar for Ketsuekiame
-1
173
Member Avatar for Darkicon

I have a slightly malfunctioning mouse. My problem is that when my computer wakes up, often my mouse stops working. The light remains on and all buttons work but I cannot move my mouse until I unplug it and plug it back in. I've written programs to fix strange issues …

Member Avatar for Darkicon
0
226
Member Avatar for JohnOSull4021

Hey guys trying to make this OO but no luck..can anyone help? import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.*; public class Main implements ActionListener { public static void main(String[] args) { new Main();// Calling the class construtor. }//end main //Setting up ALL the variables JFrame window = …

Member Avatar for JamesCherrill
0
163
Member Avatar for daino

The below code simply reads the string **"This is a test"** from a text file and displayes it on the console. I've deliberately placed an endline at the end of each time the string is loaded to show that the string is all that is passed to '**mystring**' from '**myfile**'. …

Member Avatar for daino
0
220
Member Avatar for joester007

I'm getting a warning at the end of my code that says, Warning 1 Function 'Result' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used. The code works fine, but can someone explain why I'm getting this …

Member Avatar for joester007
0
158
Member Avatar for apohbakuteh

Hi guys i am a total beginner on VB.As mention on the tittle i would love a help on my problem.Here is my code Imports System Imports System.Data Imports System.Data.OleDb Imports System.Data.SqlClient Public Class Form1 Dim conn As New System.Data.OleDb.OleDbConnection() Private Sub btnSignUp_Click(sender As Object, e As EventArgs) Handles btnSignUp.Click …

Member Avatar for apohbakuteh
0
385
Member Avatar for gahhon

I have a repeater in my webpage which containing Buttons as well.. <asp:Repeater ID="rptView" runat="server" OnItemDataBound="rptView_ItemDataBound"> <HeaderTemplate> <table border="0" width="90%"> <tr class="RepeaterHeader"> <th align="center">Date</th> <th align="center">Category</th> <th align="center">Description</th> <th align="center">Amount</th> <th align="center"></th> </tr> </HeaderTemplate> <ItemTemplate> <tr class="RepeaterData"> <td align="center"><%#Eval("CurrentDate") %></td> <td align="center"><%#Eval("Category") %></td> <td align="center"><%#Eval("Description") %></td> <td align="center"><%#Eval("Amount", "{0:C}")%></td> <td …

Member Avatar for |-|x
0
176
Member Avatar for beastie805

I am having a problem with readin input data, my program is reading the last name in my .txt document twice and inserting it into each one of my functions an extra time. here is the out put Enter the name of the .txt file that you want to open …

Member Avatar for beastie805
0
194
Member Avatar for João_5

Hello guys, my turn to ask a very simple question. I already have a Mysql DB with querys working great. I import data from Active Directory server, and one of the values is State, enabled or disabled, etc. But this values came in a form of code: 512 = Enabled …

Member Avatar for diafol
0
290
Member Avatar for pkarovsky

I'm new to this website. I have a question about how PHP formats a table but don't know where to post it. I inherited a website that has a database in Google and files written in PHP and HTML. The info from the database is posted into a table but …

Member Avatar for diafol
0
250
Member Avatar for laura301019

I have the following web crawler code and would like to add a limit as to the depth of the search but unsure how to implement this. import urllib2 def getAllNewLinksOnPage(page,prevLinks): response = urllib2.urlopen(page) html = response.read() links,pos,allFound=[],0,False while not allFound: aTag=html.find("<a href=",pos) if aTag>-1: href=html.find('"',aTag+1) endHref=html.find('"',href+1) url=html[href+1:endHref] if url[:7]=="http://": …

Member Avatar for Gribouillis
0
450
Member Avatar for kerek2

Hi All's, Really need your help, i'm trying to update existing data in MDB database by date.today but cannot update . Here my coding Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim con As New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source= PTGDB.mdb") Dim cmd As OleDbCommand = New OleDbCommand("SELECT …

Member Avatar for kerek2
0
386
Member Avatar for krystosan

Why is this stacking ontop of each other, as far as the index should get each of them to next row. data1 = {'PHOTOSHOP': '6.5', 'NUKE': '7.0v9', 'MAYA': '2014', 'TESTING': '1.28', 'KATANA': '1.7', 'MARI': '4.0'} data2 = {'PHOTOSHOP': '10.5', 'NUKE': '6.3v6', 'MAYA': '2012', 'TESTING': '1.28', 'KATANA': '1.0', 'MARI': '1.0'} class …

Member Avatar for krystosan
0
193
Member Avatar for cambalinho

the csbi.wAttributes are combinations of '|' operators,... DWORD textcolor = csbi.wAttributes & 0xff0f; DWORD backcolor = (csbi.wAttributes & 0xfff0) >> 4; i understand the 0xff0f is a hexadecimal value(i don't know in decimal), but why these number and not other? can anyone explain to me these 2 calculations? (they are …

Member Avatar for cambalinho
0
176
Member Avatar for cambalinho

i have these code for clear the screen: //clear the Console void Clear(int BackColor=0) { // home for the cursor COORD coordScreen = {0, 0}; DWORD cCharsWritten; CONSOLE_SCREEN_BUFFER_INFO csbi; DWORD dwConSize; // Get the number of character cells in the current buffer if(!GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi)) return; dwConSize = csbi.dwSize.X * csbi.dwSize.Y; …

Member Avatar for cambalinho
0
220
Member Avatar for jamojo

Hello Everyone, I am trying to compute the subscription next due date. For example, these are the subscription dates: 1/28/13 1/29/13 1/30/13 1/31/13 When I used the php function strtotime( "+1 month", <date> ) the next month due date will be: 1/28/13 due date is 2/28/13 1/29/13 due date is …

Member Avatar for jamojo
0
2K
Member Avatar for cambalinho

the prototype function is: BOOL WINAPI WriteConsoleOutputAttribute( _In_ HANDLE hConsoleOutput, _In_ const WORD *lpAttribute, _In_ DWORD nLength, _In_ COORD dwWriteCoord, _Out_ LPDWORD lpNumberOfAttrsWritten ); i'm trying use it for the 1st time... what means: "lpNumberOfAttrsWritten [out] A pointer to a variable that receives the number of attributes actually written to …

Member Avatar for cambalinho
0
2K
Member Avatar for ddnpresident

import java.util.Scanner; import java.util.Arrays; public class project { private static Scanner keyboard = new Scanner(System.in); public static void main() { double row [][]; int positionInRow, numberInRow, rowSize, index, numberOfRows,weight; int maxWeight = 100; System.out.println("Welcome to the Band of the Hour"); System.out.println("-------------------------------"); System.out.print("Please enter number of rows : "); numberOfRows = …

Member Avatar for kal_crazy
0
326
Member Avatar for aboubakarsalim.khamis

Write an algorithm and draw a flowchart to print the square of all numbers from LOW to HIGH. Test with LOW=1 and HIGH=10.

Member Avatar for CodingCabbage
0
208
Member Avatar for kbear23

I'm trying to convert int x and y arrays to string using a sample code found online. string Square::int2string (int x[]) { string returnstring = ""; for (int i=0; i < 4; i++) { returnstring += itoa(x[i]); return returnstring; } } but hit with the following error. Square.cpp:30:8: error: prototype …

Member Avatar for kiran.ghodke.395
0
4K
Member Avatar for antonio.neal.39

not working. I am using python 3.3.2. please and thank you. import urllib u = urllib.request('http://www.ctabustracker.com/bustime/map/getBusesForRoute.jsp?route=22') info = u.read() f = open('rt22.xml', 'wb') f.write(info) f.close()

Member Avatar for HiHe
0
222
Member Avatar for eric_arambula

I am new programming in Python. I am trying to create a function that simply takes the lowest payment (which starts at 10) and it simply returns the remaining balance (after 12 months of payments). 2. Outside the function I am using a loop that calls the function and checks …

Member Avatar for phoenix.enero
0
302
Member Avatar for lewashby

When I run: ---`mysql> SET PASSWORD FOR 'garrett'@'localhost' = PASSWORD('abc123');` I get: ---`ERROR 1133 (42000): Can't find any matching row in the user table` Also, when I run: ---`mysql> UPDATE mysql.user SET Password=PASSWORD('abc123') WHERE User='garrett' AND Host='localhost';` I get: ---`Query OK, 0 rows affected (0.00 sec)` ---`Rows matched: 0 Changed: …

Member Avatar for lewashby
0
430
Member Avatar for decade

Hi everyone, I'm new in vb.Net programming and i just want to ask how to validate a "Double" data type. for example. Dim number as Double number = textbox1.text If the value of "number" variable is in "Double" data type like 1.23 or 0.12 it returns a correct value and …

Member Avatar for decade
0
3K
Member Avatar for jared.geli

I was wondering if I can fill up an edited row based on the value in my Label. Here's the scenario: An employee will add and edit rows in the DataGridView1. All rows involved in adding and editing will fill up the last row with the Employee ID of the …

Member Avatar for jared.geli
0
4K
Member Avatar for eldiablo1121

Hello, I'm trying to write a program that takes an input file name and lists the folders in a heirarchy ex.Folder subfolder etc I have most of my code, but I'm getting 2 errors that are connected and I have no idea how to fix it. Here is my code: …

Member Avatar for eldiablo1121
0
271
Member Avatar for trishfernan

Hi, I have developed a drop down. In that I was trying to figure out how to reduce the <li> text gap or spacing. What do you think, which css attribute is creating this gap or spacing. Here is the demo [Click Here](http://jsfiddle.net/RtqCL/) [Click Here](null)

Member Avatar for diafol
0
94
Member Avatar for CodingCabbage

I'm starting my Computing project and am using Python linked via sqlite3 to a database. As part of my project I shall be searching for maths books in the database via name or module etc. I wish to display the results on a GUI in python so need to set …

Member Avatar for Gribouillis
0
359
Member Avatar for HunainHafeez

how to access classes or objects defined in APP_CODE folder ? i defined some classes there but how to access those ?

Member Avatar for HunainHafeez
0
170

The End.