Search Results

Search found 6502 results on 261 pages for 'dont reinvent the wheel'.

Page 202/261 | < Previous Page | 198 199 200 201 202 203 204 205 206 207 208 209  | Next Page >

  • Qt almost same main menu entries

    - by user1671710
    I'm using c++ Qt library and I want to do something which would do : connect(actionB11, SIGNAL(triggered()), this, SLOT(SetSomething(1, 1))); connect(actionB12, SIGNAL(triggered()), this, SLOT(SetSomething(1, 2))); connect(actionB21, SIGNAL(triggered()), this, SLOT(SetSomething(2, 1))); connect(actionB22, SIGNAL(triggered()), this, SLOT(SetSomething(2, 2))); The code above doesnt work because SIGNAL function has to have same number and argument types as SLOT function. Does exist a way how to do it? I dont want to have about 20 function as SetSomething11, SetSomething12 calling SetSomething(1, 1) etc.

    Read the article

  • Error with connecting ftp through php ...

    - by Holicreature
    Hi, I'm trying to connect to my server using php script to upload some files... But it doesn't connect... I dont know what is the error... I'm sure that ftp is enable, i checked it through php_info() What may be the error... <?php error_reporting(E_ALL); $ftp_server = "server.com"; //address of ftp server (leave out ftp://) $ftp_user_name = "Username"; // Username $ftp_user_pass = "Password"; // Password $conn_id = ftp_connect($ftp_server); // set up basic connection $login_result = ftp_login($conn_id,$ftp_user_name,$ftp_user_pass); if ($login_result = ftp_login($conn_id,$ftp_user_name,$ftp_user_pass)) { echo "Connected as ,$ftp_user_name,$ftp_user_pass \n"; } else { echo "Couldn't connect \n"; } ..... ..... .... .... ftp_close($conn_id); // close the FTP stream ?>

    Read the article

  • increasing speed and efficiency of ajax call

    - by user1048824
    I'm not the most disciplined dev, dont know standards and am self-taught so bear with me. I create stuff very logically and fast but not always using 'programming standards'. I have a mobile app using geolocation API. it gets thousands of places from my db and makes gmaps v3 markers for the ones around the user's current location. there is an ajax call from my JS to an aspx page that calls the database, makes a json string, and sends the json string to the javascript that then creates the google map markers. would i save time if the json string was in a flat file? im not sure if, generally speaking, accessing a sql db from an aspx page is faster than c# file i/o on a flat file with pre-rendered JSON. (of course, using the flat file, it would update everytime the db is updated)

    Read the article

  • Function to get a string and return same after processing in C

    - by C0de_Hard
    I am working on a code which requires a function. This function gets a string as input and returns a string. What I have planned so far is to get a str[], remove all $'s and spaces, and store this in another string which is returned later: char *getstring(char str[]) { int i=0; char rtn[255]; while (i<strlen(str)) { if (str[i] != " " || str[i] != "$" ) rtn[i] = str[i]; else rtn[i] = ''; } return str; } I dont feel like this will work. Any ideas?? :-S

    Read the article

  • Roundoff Timespan to 15 min interval

    - by s-a-n
    I have a property in my code where users can enter a timespan in HH:mm like 10:32 10:44 15:45 I want to round off in my property to the nearest 15mins but i dont have datetime here. I only need to do it with Timespan 10:32 to 10:30 10:44 to 10:45 15:45 to 15:45 01:02 to 01:00 02:11 to 02:15 03:22 to 03:25 23:52 to 00:00 Tried all these solutions but they involve Datetime in them How can I round up the time to the nearest X minutes? Is there a simple function for rounding a DateTime down to the nearest 30 minutes, in C#? DotNet Roundoff datetime to last 15 minutes

    Read the article

  • how to make an setup file

    - by user353998
    i am new to program,and our teacher asked us to write a small program witch using sqlserver; so i use visual studio 2010 c# to write it,but i meet a problem: i don't know how to make a setup file.because i put the SqlConnectionString in the code file directly;so,even i have publish the program ,the sqlconnectionstring didn't change,it didn't works~ this is the first time to write this kind program,and i dont know how to make it work right on others computer; can you tell me the way to solve it? do i need change the way of coding?how? thanks~

    Read the article

  • Use sudo su - <username> to access the <username's> account but sudo su - shouldn't be possible with a sudo user

    - by Winnie
    There is a requirement I got. My sudo users (for which their entry in sudoers file) should be able to access other user's account say Oracle using following command: sudo su - Oracle The above should work with giving current users password. But if the same user is firing the following command, sudo su - it shouldn't work and thus root access shouldnt be given to current user. I am not using su because because i dont want current user to know the credentials of other user(root,Oracle etc.). Can anyone please help me . Its urgent...

    Read the article

  • PHP - login to a remote server, trough my own server, with HTTPS, cookies and proxy, and downloading the html

    - by Yunga Mohani
    Hello, so what i am trying to do is this: login to the other server with a PHP on my own server (either with my username and pass/or with my cookies) then have access to the page i want to display/download i want to write a PHP script that is located on my own server, that automatically does a login to another server, that uses HTTPS and a web form for login. after the login i have access to that page that i am trying to download. i dont know if it would be possible to login and download the html only with the cookies that i have in my browser through a previous login, or if i need to do the login in my php script through some https login method. can i do any of this with curl or fsocksopen or what would be the best way to realize this? thanks in advance!

    Read the article

  • reading files provided via $_GET

    - by Max
    I have a php script which takes a relative pathname via $_GET, reads that file and creates a thumbnail of it. I dont want the user to be able to read any file from the server. Only files from a certain directory should be allowed, otherwiese the script should exit(). Here is my folder structure: files/ <-- all files from this folder are public my_stuff/ <-- this is the folder of my script that reads the files My script is accessed via mydomain.com/my_stuff/script.php?pathname=files/some.jpg. What should not be allowed e. g.: mydomain.com/my_stuff/script.php?pathname=files/../db_login.php So, here is the relevant part of the script in my_stuff folder: ... $pathname = $_GET['pathname']; $pathname = realpath('../' . $_GET['pathname']); if(strpos($pathname, '/files/') === false) exit('Error'); ... I am not really sure about that approach, doesnt seem too safe for me. Anyone with a better idea?

    Read the article

  • Working with sets of rows in (My)SQL and comparing values

    - by Pep.
    Hello, I am trying to figure out the SQL for doing some relatively simple operations on sets of records in a table but I am stuck. Consider a table with multiple rows per item, all identified by a common key. For example: serial model color XX1 A blue XX2 A blue XX3 A green XX5 B red XX6 B blue XX1 B blue What I would for example want to do is: Assuming that all model A rows must have the same color, find the rows which dont. (for example, XX3 is green). Assuming that a given serial number can only point to a single type of model, find out the rows which that does not occur (for example XX1 points both to A and B) These are all simple logically things to do. To abstract it, I want to know how to group things by using a single key (or combination of keys) and then compare the values of those records. Should I use a join on the same table? should i use some sort of array or similar? thanks for your help

    Read the article

  • Help regarding android 1.5 and 2.1 (beginner, issue of Book Version)

    - by piemesons
    I am new to android and last year i bought two books of android 1.5. But at that time i was busy in my project so was not able to work on android. Now i want to start android again. Should i go for those books or should i buy new editions Is there any major change regarding basic learnings? Two books i am having are:- Pragmatic Hello Android (New addition of this book is available, But still in beta phase) Apress begining Android (Dont know about this whether new edition is available or not) Please let me know. Thanks EDIT here i am not asking about the good books of android, as there are lot of questions regarding that. I can find out from them. My question is purely related to change in version

    Read the article

  • Javascript function not working with an array

    - by Ryan Harvie
    Hi, i have this function which loops through an array of check boxes checking if the boxes value is equal to something in a text box, i dont know whats wrong. function checkValue(contain) { var boxes = document.getElementsByTagName("input"); for (var i = 0; i < boxes.length; i++) { if (boxes[i].name == "vote[]") { if (boxes[i].value.indexOf(contain.value) != -1) { boxes[i].checked = true; } } } } and this is how i call it OnClick="uncheckAll(); checkValue(document.getElementsByName("countrylist"));" this code is in side a echo in php which is like this echo ' ';

    Read the article

  • SQL Server dynamic pivot table

    - by user972255
    In SQL Server, I have two tables TableA and TableB, based on these I need to generate a report which is kind of very complex and after doing some research I come to a conclusion that I have to go with SQL Pivot table but I dont have any idea about the SQL Pivot feature so, can anyone please help me on this. Please see the details below: Create table TableA ( ProjectID INT NOT NULL, ControlID INT NOT NULL, ControlCode Varchar(2) NOT NULL, ControlPoint Decimal NULL, ControlScore Decimal NULL, ControlValue Varchar(50) ) Sample Data ------------- ProjectID | ControlID | ControlCode | ControlPoint | ControlScore | ControlValue P001 1 A 30.44 65 Invalid P001 2 C 45.30 85 Valid Create table TableB ( ControlID INT NOT NULL, ControlChildID INT NOT NULL, ControlChildValue Varchar(200) NULL ) Sample Data ------------ ControlID | ControlChildID | ControlChildValue 1 100 Yes 1 101 No 1 102 NA 1 103 Others 2 104 Yes 2 105 SomeValue Output should be in a single row for a given ProjectID with all its Control values first & followed by child control values (based on the ControlCode (i.e.) ControlCode_Child (1, 2, 3...) and it should look like this

    Read the article

  • how to place the value for text area

    - by udaya
    Hi while I am performing the edit function .. i have a textarea where i type some text and submit <tr align="left"> <td class="table_label">Reason </td> <td><textarea cols="17" class="text_box_login_14_width_150" size="5" name="txtReason" id="txtReason"></textarea></td> </tr> when i submit i must receive the value in the edit form <td> <textarea id="txtReason" name="txtReason" value="<?= $row['dReason']?>"></textarea> </td> but i dont receive the value for text area how to receive the value

    Read the article

  • Background image help

    - by J2
    is there any way when using a div for a background image- to limit the height to only the content displayed? im putting the background image in a div because i want it centered via position:relative but the image doesnt show up unless i put a height on the div, and thats not what i want because i dont want to be able to just scroll down to the bottom of the image where theres no content ive tried putting the background image on the body css but if the browser is less than the width of the image, it just throws it over to the left and you can only see half of it- is there no way to make the background position:relative on the body? sorry if that doesnt make sense < thanks

    Read the article

  • How to add subit action to an image

    - by Priyanka
    Hello. I am supposed to add submit action to an image.So on the main page,i have done in and in css i have written .go-button { margin-right:7px; background: transparent url(../images/go.gif); width:26px; height:20px; border:0px; overflow:hidden; } But the problem is I am getting Submit query on the GO image. I dont want that. Plz help me.

    Read the article

  • How to make use of Tags property of an xml node to get its information and attributes?

    - by user72731
    How would i make use of tags property of a node so that i can get the attributes of an xml node. I have to display an xml tree in a winform and then when i click on any node, its attributes should get displayed on a list box in same window. I want to make use of tags property, but for that i need to convert that tree node in the winform into an xml node. I wanted to store the tree node in the tag and then typecast that tag to an xml node. I dont know how to do it? I am a newbie at C# so there might be some discrpancy in language...please help

    Read the article

  • can i use perl to download files in a php script?

    - by jision
    i have a file sharing website made in php which gives users to download files.But as i am using a hosted server there is limitation on time out and other factors that come to play while for a download script coded in php. This causes large files to get corrupted while downloading. i am looking for a solution for this i have tried using symbolic links but the force download factor is not taking place.... i am thinking of using perl to download files bt dont have any clue what so ever.... can any one help me outwith this problem???

    Read the article

  • Java Programming Help

    - by user215049
    hi, im a bit confused on this and i dont know how to solve this question that i have been asked, id be grateful if you could assist me on this question, maybe try to tell me what needs to be done, and how. the question is: Write a method called countChars which takes an InputStream as a parameter, reads the stream and returns the number of characters it contains as an int. Any IOExceptions which might occur in the method should be passed back to the method's caller. Note that the method header should show that it is possible that an exception might occur. i attempted this question with the following code: public class countChars { public int countChars(int InputStream) { return InputStream; } } and i get an error message saying : Main.java:26: cannot find symbol symbol : method countChars(java.io.InputStream) location: class Main s1 = "" + countChars(f1); ^ 1 error

    Read the article

  • How do I write a bash script to replace words in files and then rename files?

    - by Jason
    Hi All, I have a folder structure, as shown below: I need to create a bash script that does 4 things: It searches all the files in the generic directory and finds the string 'generic' and makes it into 'something' As above, but changes "GENERIC" to "SOMETHING" As above, but changes "Generic" to "Something" Renames any filename that has "generic" in it with "something" Right now I am doing this process manually by using the search and replace in net beans. I dont know much about bash scripting, but i'm sure this can be done. I'm thinking of something that I would run and it would take "Something" as the input. Where would I start? what functions should I use? overall guidance would be great. thanks. I am using Ubuntu 10.5 desktop edition.

    Read the article

  • What statistics app should I use for my website?

    - by Camran
    I have my own server (with root access). I need statistics of users who visit my website etc etc... I have looked at an app called Webalyzer... Is this a good choice? I run apache2 on a Ubuntu 9 system... If you know of any good statistics apps for servers please let me know. And a follow-up question: All statistics are saved in log-files right? So how large would these log-files become then? Possibility to split them would be good, dont know if this is possible with Webalyzer though...

    Read the article

  • how to create 2 controllers with same actionresult 2 views but one implementation

    - by amalatsliit
    I got a controller in my mvc application like below. public class BaseController: Controller { protected void LogInfo() { logger.InfoFormat("[SessionID: {0}, RemoteIP: {1}]", Session.SessionID, Request.UserHostAddress); } } public class FirstController : BaseController { public ActionResult Index(string name) { LogInfo(); getQueryString(); if(IsValidRec()) { if(Errors())) { return View("Error"); } var viewname = getViewName(name); return view(viewname); } else return view("NotFound"); } } I need to create another controller(SecondController ) with same ActionResult method that FirstController has but without any implementation. Because I dont wont to repeat same code in 2 ActionResult methods. what is the best way to do that. I tried in following way but I m getting error when I initialize my protected method 'LogInfo()' public class SecondController : BaseController { public ActionResult Index(string name) { var firstcontroller = new FirstController(); return firstcontroller.Index(name); } }

    Read the article

  • Uploading to a remote server periodically?

    - by user1048138
    I have been working on an app that takes screen shots, kinda like http://puush.me/ however, I would like to be able to upload the screen shots to a remote server. What protocols can I use to do so. Needs to be cross platform and secure. I know that SSH, SFTP and FTP are options, however, they all require logins that I dont want to provide to the end user. Nor do I want to sign a key for them as it would still allow their machines to remotely log in.

    Read the article

  • You have an error in your SQL syntax; check the manual that corresponds to your MySQL

    - by LuisEValencia
    I am trying to run a mysql query to find all occurences of a text. I have a syntax error but dont know where or how to fix it I am using sqlyog to execute this script DECLARE @url VARCHAR(255) SET @url = '1720' SELECT 'select * from ' + RTRIM(tbl.name) + ' where ' + RTRIM(col.name) + ' like %' + RTRIM(@url) + '%' FROM sysobjects tbl INNER JOIN syscolumns col ON tbl.id = col.id AND col.xtype IN (167, 175, 231, 239) -- (n)char and (n)varchar, there may be others to include AND col.length > 30 -- arbitrary min length into which you might store a URL WHERE tbl.type = 'U' -- user defined table 1 queries executed, 0 success, 1 errors, 0 warnings Query: declare @url varchar(255) set @url = '1720' select 'select * from ' + rtrim(tbl.name) + ' where ' + rtrim(col.name) + ' like %' ... Error Code: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'declare @url varchar(255)

    Read the article

  • Twitter Answering System with Php

    - by 1342
    I'm working on a project which gives information to students, online and instantly on Twitter ( for my university, I'm also student in Computer Engineering - first year ) I'm fetching mentions which comes to this account - https://twitter.com/BahcesehirBilgi I'm trying to search these in order to filters which i created in my panel. http://imgim.com/2107incia8023554.jpg - This is panel screenshot ( filter add ) I'm splitting filter words and searching them in mydatabase coloumn which get information about users tweet ( using mysql like, %word1%%word2% etc ). http://imgim.com/3792incis3008867.jpg - Example of filter, and answers http://imgim.com/1424incit5317319.jpg - random dashboard screenshot Here is the question, how can i search this filters more accurately and more human friendly in my database ? Please dont forget this is my first project, and new in Php and working alone :)

    Read the article

< Previous Page | 198 199 200 201 202 203 204 205 206 207 208 209  | Next Page >