Search Results

Search found 31491 results on 1260 pages for 'simple talk'.

Page 46/1260 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • Simple User Access Control with CodeIgniter framework Code (ACL) Library

    - by Hafiz Arslan Akbar
    Friends, I am new User of PHP n CodeIgniter. I just want do a simple task, user access control. there are 5 different user in a class,, I have to write a code which gives just one line output for one user. for example,, by using ACL library, just pick one out put. deal with basic level... Manager , Teacher , Student , Chairperson PHP page contain one text box and button. by using ACL library we just put one code or string in textbox and get related output... some thing like this... text box contain 1, Now Manager access Control,, text box contain 2, Now Teacher Access Control,, text box contain 3, Chairperson access control.. Plz guide step by step. Thanx in advance dear.......

    Read the article

  • Using Simple HTML Dom to match a string on the page

    - by Abs
    Hello all, How do I match and get the flash vars on a HTML page? I am using simple HTML dom element and I am able to narrow down to a div containing the text I need. <script type="text/javascript"> var s1 = new SWFObject("jw4.4/player.swf", "player", "400", "50", "9"); s1.addParam("allowfullscreen", "true"); s1.addParam('allowscriptaccess','always'); s1.addVariable("width","400"); s1.addVariable("height","50"); s1.addVariable("overstretch", "false"); s1.addParam('flashvars',"this_id=/tg&amp;autostart=true"); s1.write("container"); How do I get the value of this_id, so I want to return /tg? What would I put in find? Or do i have to use something else? $html = file_get_html("$url"); $file_path = $html->find('this_id=/'); Thanks all for any help

    Read the article

  • Simple ADO.NET C# Stored Procedure Generator

    - by Ron
    I am using Visual Studio 2005, Sql Server 2005, C#, ADO.NET. We have a very large database and routinely adding new stored procedures. I am tired of writing the C# wrapper code for these stored procedures, seems like there should be some simple utility or Add In that would allow me to simply point to a stored procedure and generate some generic C# code. I am not looking for some big ORM or data access layer framework. The company I am doing this for is not interested in moving to something like that right now. Just wanting something to take the grunt work out of writing the C# wrappers around stored procedures. Again, prefer that we do not have to include in other 3rd party libraries, etc. Any ideas?

    Read the article

  • How to enable gzip compression using PHP Simple HTML DOM Parser

    - by brant
    I have tried a few things to enable gzip compression using PHP Simple HTML DOM Parser but nothing has seemed to work thus far. Using ini_set I've manged to change the user agent, so I figured it might be possible to also enable gzip compression? include("simpdom/simple_html_dom.php"); ini_set('zlib.output_compression', 'On'); $url = 'http://www.whatsmyip.org/http_compression/'; $html = file_get_html($url); print $html; The website above tests it. Please let me know if I am going about this the wrong way completely.

    Read the article

  • Scala simple dummy project.

    - by Lukasz Lew
    Currently my whole work cycle is: edit foo.scala fsc foo.scala && scala -cp . FooMain But my project is getting bigger and I would like to split files, make unit tests, etc. But I'm too lazy for reading sbt documentation and doing whatever needs to be done to get a sbt's "Makefile". Similarly for unit tests (there are so many frameworks, which to choose?) What would make my day is a simple zipped dummy project with a dummy unit tests using sbt. Do you know whether such thing exists?

    Read the article

  • PHP Code to Generate Simple Flowchart

    - by revbackup
    I am making a flowchart out the subjects in the curriculum of our school. a flowchart is generated through its preRequisite.... for example FIRST YEAR FIRST SEMESTER SUBJECTS ---- PREREQUISITE MATH 1 ---- NONE MATH 2 ---- NONE ENGL 1 ---- NONE SOCIO 1 ----- NONE POLSCI 1 ----- NONE FIRSTE YEAR SECOND SEMESTER SUBJECTS ---- PREREQUISITE MATH 3 ----- MATH 1 MATH 4 ----- MATH 2, MATH 1 ENGL 2 ----- ENGL 1 POLSCI 2 ----- POLSCI 1 So, I must print it this way, just using simple PHP but difficult Logic.: MATH1 -----> MATH3 -----> MATH4 MATH 2 ----->MATH 4 ENGL1 -----> ENGL 2 SOCIO 1 POLSCI 1 -----> POLSCI 2 Can anyone give me a good algorithm for this, because this is really difficult. I am planning to echo the results in an HTML table, and it makes it more complicated. Do you have suggestions how to solve this problem properly and display the results also properly???? Thank you in advance!

    Read the article

  • Simple pygtk and threads example please.

    - by wtzolt
    Hello, Can someone give me a simple example involving threads in this manner, please. Problem with my code is that when I click button One, GUI freezes until its finished. I want buttons to stay responsive when def is being executed. How can i fix that? class fun: wTree = None def __init__( self ): self.wTree = gtk.glade.XML( "ui.glade" ) dic = { "on_buttonOne" : self.one, "on_buttonTwo" : self.two, } self.wTree.signal_autoconnect( dic ) gtk.main() def sone(self, widget): time.sleep(1) print "1" time.sleep(1) print "2" time.sleep(1) print "3" def stwo(self, widget): time.sleep(1) print "4" time.sleep(1) print "5" time.sleep(1) print "6" do=fun() Pretty please, help me.

    Read the article

  • C#, WindowsForms difference to simple Console App

    - by daemonfire300
    Hi there, I currently started to "port" my console projects to WinForms, but it seems I am badly failing doing that. I am simply used to a console structure: I got my classes interacting with each other depending on the input coming from the console. A simple flow: Input -> ProcessInput -> Execute -> Output -> wait for input Now I got this big Form1.cs (etc.) and the "Application.Run(Form1);" But I really got no clue how my classes can interact with the form and create a flow like I described above. I mean, I just have these "...._Click(object sender....)" for each "item" inside the form. Now I do not know where to place / start my flow / loop, and how my classes can interact with the form. thanks and regards daemonfire

    Read the article

  • Simple string encryption in .NET and Javascript

    - by jonathanconway
    I'm developing an ASP.NET MVC application in which I want to encrypt a short string on the server, using C#, and send it to the client-side. Then on the client-side it will be decrypted through Javascript code. Any thoughts on how to implement this? Do you know of a simple encryption algorithm (doesn't have to be bullet-proof secure) that can be easily translated from C# to Javascript or vice-versa? NOTE: I could do this entirely in C# and do the decryption through Ajax, but I'd prefer not to do it this way, as I want to reduce website traffic as much as possible.

    Read the article

  • Prevent Casual Piracy for Simple Utility

    - by Chad
    I've written a small utility that I wish to sell for less than $10. My primary concern is "casual piracy". The scenario that plays out in my mind is this: User buys the program, enjoys using it and tells their friends. The friends copy the application to their USB drives and take it home - using the application for free (maybe never realizing they should have purchased it. Since I've got absolutely no protection built in, it would just be a simple copy'n paste to pirate the app. The users who would be using the app are in close proximity to each other (work in the same environment), so casual piracy would likely occur frequently. Any ideas? Keeping in mind the app is cheap (partly to reduce casual piracy), and the level of effort to write the app hasn't been very demanding. Update: the app will run on any system that supports .NET 3.5.

    Read the article

  • Java: implementation of simple commands

    - by HH
    I have created a pkg for my regular simple commands. They are non-static, to be more extensible, but somewhat more time-consuming to use because of creating object to use one. My other classes use them. $ ls *.java CpF.java IsBinary.java RmLn.java Tools.java F2S.java IsRoot.java SaveToDisk.java WordCount.java Filters.java ModRelativePaths.java SetWord.java WordNumber.java Find.java powerTools.java Sort.java Which option would you choose to use them easier? to develop a small interface like 'powerTools.java' for the pkg. to create a class with static methods for them. to add a static method to each class to stop overusing 'creating too many files' and centralising some? sthing else?

    Read the article

  • Wordpress comments - perform simple math?

    - by RodeoRamsey
    I have a Wordpress website in which one of the categories I've stripped the comments field down to basic whole numbers only. The logged in user can enter data on the post via the "comments" field, in basic simple whole numbers. Is there any way to take the MOST RECENT comment on all posts from that category (cat 1) and run basic math? My goal is to take the most recent comment's input from each post and add it together and display it via some php/html on another page/post or widget somewhere. Thanks!

    Read the article

  • An simple Python extension in C

    - by celil
    I am trying to create a simple python extension module. I compiled the following code into a transit.so dynamic module #include <python2.6/Python.h> static PyObject* _print(PyObject* self, PyObject* args) { return Py_BuildValue("i", 10); } static PyMethodDef TransitMethods[] = { {"print", _print, METH_VARARGS, ""}, {NULL, NULL, 0, NULL} }; PyMODINIT_FUNC inittransit(void) { Py_InitModule("transit", TransitMethods); } However, trying to call this from python import transit transit.print() I obtain an error message File "test.py", line 2 transit.print() ^ SyntaxError: invalid syntax What's wrong with my code?

    Read the article

  • Simple ViewController / View, remove white bar?

    - by fuzzygoat
    I am just looking at setting up a simple viewController programatically, I have a ViewController.xib file that I have set the background color to RED in interface builder. I have also added the following to my AppDelegate.m @implementation syntax_MapViewAppDelegate @synthesize window; -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { viewController = [[MapViewController alloc] init]; [window addSubview:[viewController view]]; [window makeKeyAndVisible]; return YES; } -(void)dealloc { [viewController release]; [window release]; [super dealloc]; } @end When I run the code it does what I expect apart from the white bar at the bottom of the screen, can anyone give me any pointers in how to remove this? I have a feeling I might need to position the view within the window, but I am not sure how? cheers Gary

    Read the article

  • Algorithm to split an array into N groups based on item index (should be something simple)

    - by serg
    I feel that it should be something very simple and obvious but just stuck on this for the last half an hour and can't move on. All I need is to split an array of elements into N groups based on element index. For example we have an array of 30 elements [e1,e2,...e30], that has to be divided into N=3 groups like this: group1: [e1, ..., e10] group2: [e11, ..., e20] group3: [e21, ..., e30] I came up with nasty mess like this for N=3 (pseudo language, I left multiplication on 0 and 1 just for clarification): for(i=0;i<array_size;i++) { if(i>=0*(array_size/3) && i<1*(array_size/3) { print "group1"; } else if(i>=1*(array_size/3) && i<2*(array_size/3) { print "group2"; } else if(i>=2*(array_size/3) && i<3*(array_size/3) print "group3"; } } But what would be the proper general solution? Thanks.

    Read the article

  • simple process rollback question

    - by OckhamsRazor
    hi folks! while revising for an exam, i came across this simple question asking about rollbacks in processes. i understand how rollbacks occur, but i need some validation on my answer. The question: my confusion results from the fact that there is interprocess communication between the processes. does that change anything in terms of where to rollback? my answer would be R13, R23, R32 and R43. any help is greatly appreciated! thanks!

    Read the article

  • simple authorisation in web api

    - by monthon1
    I want to make nice and clean api; I'm making site and I want to offer the ability to mobile apps use web API of my site. I don't want to use oAuth, becouse the mobile and embedded applications that are facing the biggest hurdle, as they may not be able to bring up and/or control the web browser. Also its a little complicate. I know, that HTTP basic authorisation is not safe, but it's so simple... I want to use it in my api. I have somee users logins and their passwords (md5-encoded) in mysql base, but how to use those data in this HTTP basic authorisation?

    Read the article

  • How to do simple math in datagridview

    - by EB
    I am new to C#. I have a datagridview with 9 columns. I am simply trying take the value in column 5 and subtract it from column 6. Then display the result in column 9. It seems simple enough.I know it's done in excel all the time. But I just cannot figure this out. Do I need to create a new class with a method called calculate columns? or does the datagridview class have something already built in that can handle this? Again, I am new to C#. Any help would be appreciated. Thank you, Oceantrain.

    Read the article

  • A simple Python extension in C

    - by celil
    I am trying to create a simple python extension module. I compiled the following code into a transit.so dynamic module #include <python2.6/Python.h> static PyObject* _print(PyObject* self, PyObject* args) { return Py_BuildValue("i", 10); } static PyMethodDef TransitMethods[] = { {"print", _print, METH_VARARGS, ""}, {NULL, NULL, 0, NULL} }; PyMODINIT_FUNC inittransit(void) { Py_InitModule("transit", TransitMethods); } However, trying to call this from python import transit transit.print() I obtain an error message File "test.py", line 2 transit.print() ^ SyntaxError: invalid syntax What's wrong with my code?

    Read the article

  • Simple Javascript Won't work

    - by webzide
    Dear Experts, I was testing some code and I became very frustrated as I couldn't even get an simple DOM alert box to work Anyway here's the code <!DOCTYPE HTML PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/tdt/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript"> <!-- var x=document.getElementById("myHeader"); alert(x.innerHTML); //--> </script> </head> <body> <h1 id="myHeader">Click me!</h1> </body> </html> I don't know what I did wrong but I just don't see the alert box. I use FF btw.

    Read the article

  • Custom app.config section with a simple list of "add" elements

    - by Joe
    How do I create a custom app.config section that is just a simple list of add elements? I have found a few examples (e.g. http://stackoverflow.com/questions/1316058) for custom sections that look like this: <RegisterCompanies> <Companies> <Company name="Tata Motors" code="Tata"/> <Company name="Honda Motors" code="Honda"/> </Companies> </RegisterCompanies> But how do I avoid the extra collection element ("Companies") so that it looks the same as the appSettings and connectionStrings sections? In other words, I'd like: <registerCompanies> <add name="Tata Motors" code="Tata"/> <add name="Honda Motors" code="Honda"/> </registerCompanies>

    Read the article

  • [Simple] Beginner AJAX script not working, stuck on opening XMLHttpRequest

    - by Julian H. Lam
    Hopefully, this question isn't too juvenile to ask - but here goes: I'm trying to learn AJAX, and I'm stuck on a simple content-fetch. Here is my code: request = getHTTPObject(); function useHttpResponse() { if (request.readyState == 4) { document.getElementById("p").innerHTML = request.responseText; } } function update_p() { request.open("GET",content.html,true); request.onreadystatechange = useHttpResponse; } getHTTPObject is correctly defined, and returns a proper XMLHttpObject. As you probably guessed from the excerpt, the element I am trying to update is id'd "p". It calls the script correctly when a button is clicked, no problem there. The script seems to stop at line 8, at request.open. There's no error, and the script silently ignores anything afterward. I don't think I've missed anything, but of course, I probably did. Where did I go wrong? Thanks!

    Read the article

  • A series of simple Aggregate Root questions (Domain Driven Design)

    - by Robert
    I have a few (hopefully) simple questions about aggregate roots in domain driven design: Is it okay to have an aggregate root as a property of another aggregate root? Is it okay to have a given entity inside two or more aggregate roots? My final question is a bit more involved. I have a website that has a few entities that really belong to a "website" aggregate root. They are 'News', 'Products', and 'Users'. There isn't a 'Website' table in the database, but a 'Website' seems like a good aggregate root for these three entities. How is this usually achieved? Thanks!

    Read the article

  • Simple Java question

    - by user322102
    Hi All I new to java so bare with me if this is a ridiculously simple question but I am curious about this method call which has {code} being taken in - see code below for an example in the method addSelectionListener. What is the purpose of this? I have been looking through docs for an explaination but cant seem to find what this practice is called never mind any useful information. setStatusLine.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { String message = "I would like to say hello to you."; if (pressed) { message = "Thank you for using me"; } setStatusLine(message); pressed = !pressed; } }); Thanks for any help or insights that can be offered

    Read the article

  • Free and Simple Hosting Solution with DB Support?

    - by darren
    Hi everyone I have compiled an sqlite database that I would like to make public. I want to provide a very simple webpage that has a few form elements which are used to query the database. Does anybody know of a free hosting solution that would provide me with free web and database functionality? I am familiar with Google App Engine and that would work but I don't want to spend time using their custom storage scheme. I'm looking for something free that I can put together very quickly. Thanks for any suggestions.

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >