Search Results

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

Page 188/261 | < Previous Page | 184 185 186 187 188 189 190 191 192 193 194 195  | Next Page >

  • MVC Html.ActionLink with post funtionality?

    - by Levitikon
    I'm checking to see if anyone has written an MVC extension for Html.ActionLink that you can pass in Post parameters like such: <% Html.ActionLink("Click me", "Index", "Home", new { MyRouteValue = "123" }, null, new { postParam1 = "a", postParam2 = "b" }); %> That would render the link like normal but having an onClick event that submits an also rendered form with an Action url for the Action, Controller, and Route Values with additional hidden inputs from the Post Parameters like such: <a href="#" onClick="$('#theform').submit(); return false;">Click me</a> <form id="theform" action="/Home/Index/123" method="post"> <input type="hidden" name="postParam1" value="a"> <input type="hidden" name="postParam2" value="b"> </form> I'm looking to redirect users to various pages with potentially a lot of data. Not only from page to page, but from email to page also. This would be highly reusable and I think would clean up a lot of code, and would save a bunch of time writing this if its already floating around out there. I hate recreating the wheel when I don't have to. Thanks!

    Read the article

  • APC not recommended for production?

    - by solomongaby
    I have started having problems with my VPS in the way that it would faill to serve the pages on all the websites. It just showed a blank page, or offered to download the php file ( luckily the code was not in the download file :) ). The server was still running, but this seemed to be a problem with PHP, since i could login into WHM. If i did a apache restart, the sites would work again. After some talks with the server support they told me this is a problem with the APC extension witch they considered to be old and not recommended for production servers. So they removed it for now, to see if the same kind of fails would continue to appear. I haven't read anywhere that APC could have some problems or that its not always recommended to use, quite the contrary ... everywhere people are saying to always use it. The APC extension was installed ssh and is the latest version. Edit: They also dont recomend MemCache and say that a more reliable extension would be eAccelerator

    Read the article

  • How to implement User base security not role base in asp.net?

    - by Gaurav
    Hi, I have to implement User base security in my Web project using .Net3.5. Followings are some we need: Roles can be Admin, Manage, Editor, Member etc User can have multiple roles Every roles has its own dynamic menus and restrictions/resources All menus and interface will populate dynamically from Database I heard some where this kind of i.e user base security can be implemented using HashTable but I dont know how is it? Today I came to know that for this kind of work Java people use Interceptor Design patterns. So, how could I do the same in asp.net C#?

    Read the article

  • what factors should a fresher(for programmer job) consider and learn before saying yes to employer f

    - by Senthil
    what factors should a fresher(for programmer job) consider and learn before saying yes to employer for job offer? and to contract? and most importantly how should one get the details?how can I approach them? I know some employers dont want to give such details..right? I have shortlisted by a Software COmpany..that is parter with microsoft. and works on technology like VB ADO.DOTNET,and some other reporting stuffs.,sql servers etc.,Tell me about scope of that..because They are asking me to sign for 2 year certificate bond agreement..I want to be a great programmer and Project Leader after 5 years..advise me guys..Language/OS not problem for me,As I curious to learn more things. Most of the SO members are programmers..so yours advice is greatly appreciated

    Read the article

  • Problem in serializing

    - by Harun
    Hello Guyz, Presently I need to serialize one of my object which contains more my own classes object. But the problem is I dont want to save it in a file and then retrieve it into memory stream. Is there any way to directly serialize my object into stream. I used BinaryFormatter for seializing. First I used a MemoryStream directly to take serialize output but it is giving error at time of deserialization. But later when I serialize it with a file then close it and again reopen it , it works perfectly. But I want to take it direct into stream because in my program I need to do it frequently to pass it into network client. And using file repeatedly might slow down my software. Hope I clear my problem. Any Sugetion ?

    Read the article

  • SQL Syntax for Complex Scenario (Deals)

    - by Yisman
    hello everyone i have a complex query to be written but cannot figure it out here are my tables Sales --one row for each sale made in the system SaleProducts --one row for each line in the invoice (similar to OrderDetails in NW) Deals --a list of possible deals/offers that a sale may be entitled to DealProducts --a list of quantities of products that must be purchased in order to get a deal now im trying to make a query which will tell me for each sale which deals he may get the relevant fields are: Sales: SaleID (PK) SaleProducts: SaleID (FK), ProductID (FK) Deals: DealID (PK) DealProducts: DealID(FK), ProductID(FK), Mandatories (int) for required qty i believe that i should be able to use some sort of cross join or outer join, but it aint working here is one sample (of about 30 things i tried) SELECT DealProducts.DealID, DealProducts.ProductID, DealProducts.Mandatories, viwSaleProductCount.SaleID, viwSaleProductCount.ProductCount FROM DealProducts LEFT OUTER JOIN viwSaleProductCount ON DealProducts.ProductID = viwSaleProductCount.ProductID GROUP BY DealProducts.DealID, DealProducts.ProductID, DealProducts.Mandatories, viwSaleProductCount.SaleID, viwSaleProductCount.ProductCount the problem is that it doesnt show any product deals that r not fullfiled (probably because of the productid join). i need that also sales that dont have the requiremnets show up, then i can filter out any saleid that exists in this query "where AmountBought thank you for your help

    Read the article

  • search text in pdf in iphone

    - by Jaimin
    i m trying to do search funtionality in iphone.. i pass the page number and the string to be searched.. but it is not getting the proper output. in contentStream i get nothing.. i got this code by googling. i dont know what will be dere in contentStream object. -(BOOL)page:(CGPDFPageRef)inPage containsString:(NSString *)inSearchString; { [self setCurrentData:[NSMutableString string]]; CGPDFContentStreamRef contentStream = CGPDFContentStreamCreateWithPage(inPage); CGPDFScannerRef scanner = CGPDFScannerCreate(contentStream, table, self); bool ret = CGPDFScannerScan(scanner); CGPDFScannerRelease(scanner); CGPDFContentStreamRelease(contentStream); return ([[currentData uppercaseString] rangeOfString:[inSearchString uppercaseString]].location != NSNotFound); } need help urgently.. and if there is any other solution than also it is fine..

    Read the article

  • MD5 password twice

    - by NoviceCoding
    I know MD5's safety is under question lately and this is the reason a lot of people are using salt (I dont understand this at all btw) but I was wondering if you wanted to easily implement a safe system in php can you just md5 something twice? like test 098f6bcd4621d373cade4e832627b4f6 fb469d7ef430b0baf0cab6c436e70375 So basically: $val = 'test'; $val = md5($val); $val = md5($val); Would that solve the whole rainbow security stuff? Is there an easy/noob proof way of making secure database passwords in php?

    Read the article

  • C++ Header Guard issues

    - by JP
    I am making a small C++ framework, which contains many .h and .cpp. I have created a general include which include all my .h file such as: framework.h #include "A.h" #include "B.h" #include "C.h" each .h header are protected with include guard such as #ifndef A_HEADER #define A_HEADER ... #endif The issues is, I would like to be able to include "framework.h" inside all the sub .h such as, but it cause lots of compiler error: #ifndef A_HEADER #define A_HEADER #include "framework.h" ... #endif If instead I use the real header file for each sub header, and the framework.h for what ever use my framework it works fine.. I would just like to include the main header inside all my sub .h so I dont need to include all the dependency everytime. Thanks :)

    Read the article

  • handling broadcast reciver

    - by rayman
    Hi, I have an app which has MainActivity(without gui.. please just flow with it:) ) now this MainActivity running a service, this service using sendBroadcast() in order to comunnicate with the MainActivity.. now ofcourse i need to registerReceiver in the onResume() of the MainActivity. but i also need to add unregisterReceiver(receiver) in the onDestroy() of the MainActivity. problem is: when i first start that app i need it to up the service, and i dont want the user to lose focus, so i press finish() after i`am starting the service.. but then auto invoked also unregisterReceiver(receiver).. and this is not good for me.. i get error it's said it couldnt find any registerd reciver. so i fixed it by delete this line.. but i am sure its going to 'revenege' me in the future, when/where could i have problem if i wont use unregisterReceiver(receiver).. at the onDestroy() thanks, ray.

    Read the article

  • how to set the permission to a user for stream publishing in facebook?

    - by saranraj
    Hi, I would like to post the stream from my website to facebook user wall by using facebook API.. I have created the facebook application posted the stream by application admin .. passed the parameter which required to this function.. $this-facebook-api_client-stream_publish($comments,'From:blinkbee.com',$action_link,$f_user_id,$f_user_id); 3.sucessfully posted the stream.. 4.Then i changed the target_id and user_id of other users.. it showing the error like "USERID" does not resolve to a valid user ID.. 5.i dont know how to set the permission to other users.. Please help me to solve it soon.. thanks saran http://careerjobz.com

    Read the article

  • Android use of an string array on another method

    - by spagi
    Hi all. Im trying to make an activity that has a multiple choice dialog after you push a button. In there you select from a list of things. But these things are received from a web method before the dialog appears. So I create a string array after I receive them inside the onCreate to initialise it there with the correct size. But my dialog method then cant get the array because propably its out of its scope. My code looks like this @Override protected Dialog onCreateDialog(int id) //Here is where the array is loaded to the multiple select dialog etc @Override public void onCreate(Bundle savedInstanceState) //Here is where i initialise the array and get its contents etc I cant initialise my array when the class starts because I dont know its size yet. This has to do something with the scopes of my variables and I am pretty confused

    Read the article

  • access vmware local server from internet

    - by goutham
    I have installed a ubuntu machine with apache server in Vmware-workstation Now how can I access apache server from internet using my IP. Details: network for vmware :NAT the ip address in ubuntu is 192.168.1.4 my host IP is *..239.232 if I type 192.168.1.4 in web browser I get the apache content... but if I type my host IP then I dont get it.. If I install a apache server on host(win7) I can access the host apache content with my host IP from anywhere .. I want to access the vmware apache content from internet using host IP ....

    Read the article

  • How to get image from relative URL in C#, the image cannot be in the project

    - by red-X
    I have a project where I'm loading relative image Uri's from an xml file. I'm loading the image like this: if (child.Name == "photo" && child.Attributes["href"] != null && File.Exists(child.Attributes["href"].Value)) { Image image = new Image(); image.Source = new BitmapImage(new Uri(child.Attributes["href"].Value, UriKind.RelativeOrAbsolute)); images.Add(image); } Where the "child" object is an XmlNode which could looks like this <photo name="info" href="Resources\Content\test.png"/> During debug it seemd images is filled with actual images but when I want to see them in any way it shows nothing. Weird thing is when I include the images in my project it does work, I however dont want to do that since my point for using an xml file is so that it would be lost since you'd have to rebuild the program anyway after a change.

    Read the article

  • Watir question regarding table rows and loop

    - by AJ
    Hi, I would like to go through a table and look for a word, if that word appears, i would like to click on a radio button in the same row, but not the same column, then stop the loop. I have something like this at the moment but i dont know where to go on from here. @ie.div(:class, 'tableclass').table(:index, 1).each do | row | row.each do | cell | if (cell.text() == 'text') ##Set radio button break end end end I tried selecting a radio by name and index, but i do not know how to get the row number that it is currently at. Thanks.

    Read the article

  • asp.net app slow and not rendering but .txt file works fine?

    - by mike
    i have a load balanced set of 2 servers running a .net application that is loading slow and not at all to the point the load balancer is redirecting me and my users to our dr server. i added a hard coded file to both servers to tell what server is working and not. both pull the txt file and display its contents in no time. however the asp.net pages dont render. the DB is not sweating and even a plain .aspx page doesnt come up. any thoughts on trouble shooting this?

    Read the article

  • Unable to read values from object returned from ActiveRecord.find

    - by Venki
    I make the following call to the DB. @patientRegistration = PatientRegistration.find(:all, :conditions=["name = '#{patientName}'"]) Search for patient registration based on a given name. I get a valid @patientRegistration object.When I invoke @patientRegistration.inspect it prints correctly all the values for the object in the DB. But when I try to read a particular attribute (Say id or name) by doing the following: @patientRegistration.id or @patientRegistration.name. I get invalid values. Either its blank or some junk values. I dont understand how inspect is able to retrieve all the values correctly but reading individual attributes gives invalid values. Thanks

    Read the article

  • AS3 try/catch out of memory

    - by StfnoPad
    Hi, I'm loading a few huge images on my flex/as3 app, but I can't manage to catch the error when the flash player runs out of memory. Here is the what I was thinking might work (I use ???? because i dont know what to catch): try{ images = new Array(frames); for (var i:uint = 0; i < frames; i++){ imagesBA[i] = new BitmapData(width, height, false, 0x000000FF); } } catch(error:????){ Alert.show("Out of memory!"); } Any idea what ???? can be? Or does anyone knows how to catch when there is no memory for a variable?

    Read the article

  • Noob here, but wanting to try and make my own app.

    - by Justin
    Hi all, I have a small amount of programing experience with Siemens and Allen Bradley but would like to make my own app for a certain website I frequent. I would like the website to be a little more user friendly for me instead of having to open browser etc. Is it possible to have a simple forum translated into a widget so you can see the forum posts and post from there? The website in question is http://vnboards.ign.com Any ideas or suggestions no matter how bad are appreciated. If it isnt worth attempting or my skills may not be up to par, feel free to say so :P Dont pull any punches :) Thanks! Justin

    Read the article

  • how to access a label form user control in Parent class ?

    - by haansi
    I have a class UserControlBase that inherits System.Web.UI.UserControl and my user controls inherit UserControlBase class. UserControlBase has some common functions that are used in all user controls. I want to put error display funtion to UserControlBase as well so that I may not have to declare and manage it in all user controls. Error will be displayed in some label in usercontrol. Issue is how to access label which is in usercontrol in UserControlBase in function ? I dont want to pass label as argument. Please guide me on this issue. thanks

    Read the article

  • Make C# source run as a script?

    - by acidzombie24
    I am doing a little scripting and i find some more power would be nice. Like the ability to keep trying to delete a file with a 1sec delay AND have it portable since i spent some time today translating a bat script to bash. I know i can use php or python but i VERY MUCH PREFER static/compile time checking. Is there a way to run C# code as a script? I am hoping i dont have to create a custom ext and write a app to dynamically compile and execute the script (i know have source to compile .js somewhere...). Does anyone know of a solution?

    Read the article

  • qapps runs well but breakpoint sometimes generates segmentation fault

    - by yan bellavance
    I have a qApp that generates a segmentation fault only when a breakpoint is inserted in the code (I can put it at different places) and only after 4-5 breakpoint stops. Do I have a problem with my code or is this a DBG bug. the method is part of a QThread Class. Basically what I did is i took the mandlebrot example, and have 3 instances of it in my program. So the program would look like a mainwindow that has 3 mandlebrot widgets in it, one besides the other. Is it possible that GDB doesnt support debugging qthread subclasses that are instantiated multiple times or is it thread-unsafe to do so. I dont have any problems at run-time.

    Read the article

  • Store code line in a string?

    - by user1342164
    I need to store code in a string so that if a value is true, it is in the code line if not true its not in the code line. When I populate summarytextbox if consulting amount is "" then dont use this code if is does have an amount include the code. Is this possible? Other wise I would have to do a bunch if then statements. When I do the following below it cant convert to double. Dim ConsultingFee As String Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Session("ConsultingFeeAmount") = "" Then Else 'Store the following line in a string???? ConsultingFee = +Environment.NewLine + Session("ConsultingFee") + " Amount: " + Session("ConsultingFeeAmount") End If SummaryTextBox.Text = Session("TeachingHospital") + Environment.NewLine + Session("HospitalAddress") + Environment.NewLine + Session("HospitalCity") + Environment.NewLine + Session("HospitalState") + Environment.NewLine + Session("HospitalZip") + Environment.NewLine + Session("HospitalTIN") + ConsultingFee End Sub

    Read the article

  • Django: Proper place to unregister ModelAdmins

    - by lazerscience
    Sometimes I need to UNREGISTER some ModelAdmins from the admin site, because I don't want them to be there as they are, eg. if I'm using the Sites framework, and I dont want it to appear in the admin. It's no big deal to e.g. call admin.site.unregister(Site) to do so. In most cases I put it in admin.py of some related app that I have made, but sometimes I end up putting it in a place that hasn't much to do with the original app; another possibility would be making a "dummy app" and put it there... Does anybody know a more descent place where these calls can live?

    Read the article

  • Jquery disable link for 5 seconds

    - by John
    I have this code: $('#page-refresh').click( function() { $.ajax({ url: "/page1.php", cache: false, dataType: "html", success: function(data) { $('#pagelist').html(data); } }); return false; }); In this code is it possible that on the ajax success function it disables the #page-refresh click for 5 seconds then re-enable it? Basically if a person clicks the button and this action happens I dont want them to click and run this action again for another 5 seconds. I looked at delay() to unbind the click for this then bind it again but once it unbinded it never allowed me to click the button anymore.

    Read the article

< Previous Page | 184 185 186 187 188 189 190 191 192 193 194 195  | Next Page >