Search Results

Search found 168 results on 7 pages for 'imran omar bukhsh'.

Page 6/7 | < Previous Page | 2 3 4 5 6 7  | Next Page >

  • If you use MVC in your web app then you dont need to use Smarty(TemplateEngine) Right?

    - by Imran
    I'm just trying to understand the Templating(system). If you use MVC in your web application then you don't need to use something like Smarty(template engine) as you are already separating application code from presentation code anyway by using MVC right? please correct me? So am i correct in thinking it's MVC OR Templating or do you use both in your apps?If any one could explain this in detail it would be great. Thank you in advance;-)

    Read the article

  • changing the saved contents of the model , edit model fileds once saved

    - by imran-glt
    hi I have extended the user model and added extra fields to it i.e "latitude" "longitude" and status and than save it. up to here it works fine. but i want to allow the user to change his/her "latitude" "longitude" whenever he/she needs like the hotmail and yahoo allows change account feature. in my case the user only wants to chage the latitude and longitude i tried it in this way but it didnt work. is this the right way to do it ...... or is there any other way to change the saved contents view.py def status_change(request): print "status_change function called" if request.method == "POST": rform = registerForm(data = request.POST) uform = UserForm(data = request.POST) if rform.is_valid(): user = uform.save() register = rform.save() register.user = user register.save() return render_to_response('home.html') else: rform = registerForm() return render_to_response('status_change.html',{'rform':rform})

    Read the article

  • Symfony 1.4 filter on index page

    - by Imran Azad
    I'm trying to apply a filter to the index page of my module, the code works as I've tested it on another page called filter within the same module. The problem I'm having is that on submitting the filter on the index page (form action points to index) Symfony instead decides to route to the create action for some reason. Although the create method isn't visible in the URL a new form is instantiated on the index page which leads me to suspect it is routing to the create action: http://locahost.com/frontend_dev.php/mymodule Any ideas how I can get a filter to work on the index page?

    Read the article

  • Problem with Replace in Eclipse

    - by Imran
    I'm using regex to match all non-quoted property names in my json files. Eclipse has no problem finding the desired matches, but when I want to replace the matched strings with "$2", I get this error: Match string has changed in file filename.json. Match skipped Here's the regex I'm using: `((\w+)\s*(?!['"])(?=:))` Any idea on how to work around this issue?

    Read the article

  • Can learning a new language (Human not programming) help your career?

    - by Omar Kooheji
    I was wondering if anyone had any experience of learning a new language (a human language not a programming one) and whether is has helped you get ahead in your career. I'm assuming that the new language is one other than English which I think is fairly essential to programming as most programming resources seem to be english. The reason I ask is I speak Arabic and was told that it would give me an edge when I was looking for jobs, and yet so far in my current job it's completely irrelevant and in my last job I had it was used but I didn't get any special "appreciation" for speaking it.

    Read the article

  • Select most recent record in sub child

    - by Omar
    I have the following tables/columns: Parent: ParentID Child: ChildID ParentID SubChild: SubChildID ChildID Date Parent has 1 to Many relationship with Child Child has 1 to Many relationship with SubChild For every Parent, I need to get the SubChild with the most recent Date value. How can I do this using SQL. I've tried using MAX(Date), but I can't seem to figure out how to join Parent and Child successfully. The ideal result set would contain all the Parents joined with all the SubChild columns of the latest record. Note: using MS SQL 2005+

    Read the article

  • Playing .swf file in MediaPlayer?

    - by Omar
    I'm having some issues in playing .swf files on my application. On my PC, using Media Player Classic, they work normally, but on my phone they dont, all I hear is weird sounds.. the code I use to play: mediaplayer = MediaPlayer.create(getBaseContext(), Uri.parse(CurrentAyaSoundPath)); Can anyone tell me why I cant play .swf files normally? Is there another way to play them? Edit1: the .swf are sound only.. no video

    Read the article

  • What does RETURN TRUE do in a php function?

    - by Imran
    I was just looking at this code and i don't understand what RETURN TRUE does or what the point of it is? Can someone please explain? class Elephpant { public $colour; public function dance() { echo "elephpant dances!\n"; return true; } } Thankyou in advance ;-)

    Read the article

  • JavaScript Keycode 46 is DEL Function key or (.) period sign?

    - by Omar
    Im writing some logic in JavaScript using jquery, where i must check the input content against a REGEX pattern ex: "^[a-zA-Z0-9_]*$" //Alpha-numeric and _ The logic is almost done, i just have a little problem filtering the function key DEL, my logic goes like this: var FunctionsKey = new Array(8, 9, 13, 16, 35, 36, 37, 39, 46); function keypressValidation(key) { if (config.regexExp != null) { if ($.inArray(key, FunctionsKey) != -1) { return true; } else { var keyChar = String.fromCharCode(key); return RegexCheck(keyChar); } } return true; } If the KeyCode is one of those in the array, i let it pass, if not i get the char and compare it against the REGEX. The problem is: in some Browsers the DEL and '.' (period sign) have the same key Code 46. So is there a better logic to filter the function keys or must i write a condition for that case, maybe removing the 46 from the array and try to convert it to char and if is (.) let it go to the Regex function if not let it pass? The other question will be are there more shared Key Codes in some browsers? EDIT: My suggested solution wont work because it doesn't matter which key the user pressed (DEL or period) i always get (.) as CHAR at least on OPERA and FF =(.

    Read the article

  • display icon in menuitem (Firefox)

    - by Omar Abid
    I use the following code <menu image="chrome://mecho/content/ic.png" label="Mecho Submission Form" class="menu-iconic" id="mechi-menu" insertafter="context-copylink"> Firefox displays an icon in the menu; however when I use the following (for the submenu) <menuitem label="App" image="chrome://mecho/content/icons/app.png" class="menu-iconic" onclick="mecho.add('katzcd','App')"/> It doesn't show up!! any idea?

    Read the article

  • Hpricot: Stop auto fixing HTML

    - by Imran
    Consider the following example (sample data): doc = Hpricot("<a><table><tr><td>LOREM IPSUM</td></tr></table></a>") it converts it to <a></a><table><tr><td>LOREM IPSUM</td></tr></table> What it actually do is, pull out the table from <a> tag. I think Hpricot tries to repair the HTML. How can I stop Hpricot doing this?

    Read the article

  • Get Distance from geohash field in solr 3.6

    - by Omar A. Shaaban
    Is it possible to get distance returned from a geodist() filter, on a geohash field that has multiple values? The geosort and the geodist filter are working fine, but I'm trying to get the distance between the query point and a location that was returned in the result. I've tried http://wiki.apache.org/solr/SpatialSearch#Returning_the_distance The second method which is : //localhost:8983/solr/select?indent=true&fl=name,store&sfield=store&pt=45.15,-93.85&sort=score%20asc&q={!func}geodist() But it returns weird results, tested with 2 locations it returns score 9979.032, where there is ~33,000 Km between both points in reality? What is the unit that it uses returning the distance in the score field? I assumed km, but it does not make sense, or the result is bogus, I dunno Anyhelp would be appreciated, thanks

    Read the article

  • Taking screen shot of a SurfaceView in android

    - by Mostafa Imran
    I am using following method to taking screen shot of a particular view which is a SurfaceView. public void takeScreenShot(View surface_view){ // create bitmap screen capture Bitmap bitmap; View v1 = surface_view; v1.setDrawingCacheEnabled(true); bitmap = Bitmap.createBitmap(v1.getDrawingCache()); v1.setDrawingCacheEnabled(false); ByteArrayOutputStream bos = new ByteArrayOutputStream(); bitmap.compress(CompressFormat.PNG, 0, bos); byte[] imageData = bos.toByteArray(); } the problem is its giving me the whole activity screen image. But I need to take screen shot of the particular view. I tried other ways but those give me a black screen as screen shot, some posts says that it requires rooted device. Can any one help me please. I'm in need of this solution. Help me....

    Read the article

  • How to show alert in a jsp from a servlet and then redirect to another jsp?

    - by Xaul Omar Tobar
    I tried this but does not display the message only redirects login.jsp <form method="post" action="Login_Servlet" > <input name="idUsuario" type="text"/> <input name="password" type="password" /> <button type="submit">Entrar</button> </form> Login_Servlet response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); String userid= request.getParameter("idUser"); String password = request.getParameter("password"); Login_Service login_Service = new Login_Service(); boolean result = login_Servicio.aut(userid, password); Usuario user = login_Servicio.getUsuariosByUsuario(userid); if(result == true){ request.getSession().setAttribute("user", user); response.sendRedirect("vistas/Inicio.jsp"); } else{ out.println("<script type=\"text/javascript\">"); out.println("alert('User or password incorrect');"); out.println("</script>"); response.sendRedirect("index.jsp"); } Is it possible to display a message like this? if so I'm doing wrong?

    Read the article

< Previous Page | 2 3 4 5 6 7  | Next Page >