Search Results

Search found 229 results on 10 pages for 'khalid saif'.

Page 9/10 | < Previous Page | 5 6 7 8 9 10  | Next Page >

  • .htaccess redirect or rewrite to default language url

    - by Saif Bechan
    I have a website that is currently in Dutch. Now I want to make the website multi-language starting with English. I am not that good at .htaccess files and the information on the web is quite confusing. The website I have now uses pretty urls, so all my urls look like this: http://mydomain.com/about/info http://mydomain.com/about/contact The code that I use for that is the following: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.*)$ index.php?rt=$1 [L,QSA] </IfModule> I really do not know what this means, esp the [L,QSA]. But it's ok, it works for now. But now I want to add a default redirect to the code. So it becomes as follow http://mydomain.com becomes http://mydomain.com/nl I assume all my old links http://mydomain.com/about/info will not work anymore, but that is a step I am willing to take. Can someone please help me with this code. I have seen a lot of peaces of code, but I can not find the right one.

    Read the article

  • SubSonic 2.2 Class Generation

    - by Saif Khan
    Hi, I am using SubSonic on a project with many tables which were created by a sourcecode generator. I noticed Some classes created by SubSonic were generated without code and have the folowing message The class...was not generated because ... does not have a primary key. Is there any way for me to get the code to be generated without adding keyes to all the tables? Thanks

    Read the article

  • How to hack your own website

    - by Saif Bechan
    I am in late testing phase of my web application. The application will be tested at a larger scale now. During this time I want to try and hack my own system and application with some tools, scripts, etc. Mostly some code I can try and execute in the browser. I have backups for the whole system so even down to the kernel can be hacked. My system is nginx,apache,php,mysql on Linux CentOS.

    Read the article

  • Draw and move animation from xml in android

    - by Muahammad Yousuf Saif
    What I want to do: I want to draw image from xml and then animate it from xml. this image should move with constant speed anywhere on our screen. Now the problem is: I can draw and animate image from xml but i can not move this image with constant speed. I am using two xml files: One for animate and other for moving. XML for animation: android:duration="200"/ XML file for move: <translate android:interpolator="@android:anim/linear_interpolator" android:fromXDelta="2%" android:toXDelta="400%" android:fromYDelta="2%" android:toYDelta="800%"/> Activity.java file code in onCreate() method: ImageView rocketImage = (ImageView) findViewById(R.id.rocket_image); Animation hyperspaceJump = AnimationUtils.loadAnimation(this, R.anim.hyperspace_jump); rocketImage.setBackgroundResource(R.drawable.rocket_thrust); AnimationDrawable rocketAnimation = (AnimationDrawable) rocketImage.getBackground(); rocketAnimation.start(); rocketImage.startAnimation(hyperspaceJump);

    Read the article

  • Adding a MongoDB collection to Netbeans

    - by Saif Bechan
    In Netbeans I have an option to add my mysql databases to netbeans. This way I can easily browse and so small queries. Now I am working on a MongoDB project, and I want to know if it is possible to use the same functionality. I see that on the website of mongo there is a list of drivers, and I see that you can add drivers in netbeans. I do not know if the same thing, or if this can be used. I have tried google, but no luck. Anyone have an idea?

    Read the article

  • Translate HTML files to another language

    - by Saif Bechan
    I have a website with Dutch text which I want to translate to English. Is there a fast way of doing this with keeping the HTML tags(<strong>,<span>) in tact. I know I can just copy the parsed TEXT into a translator but this will remove the formatting. I also know that at the end I have to go trough the text manually to fix some minor spelling and grammar.

    Read the article

  • Correct structure and way of website versioning

    - by Saif Bechan
    Recently I use GIT to version my website. It makes it all really easy to see how my project develops and I always have save backups on different places on the web. Now my main question is if it is recommended to version your whole root of the website. I have a basic structure that looks something like this: /httpdocs /config /media /application index.php .htaccess 1) Should I use the /httpdocs folder to version, or should I use the content of the folder. 2) Is it recommended to version the media folder. In the media version I have several images for the overall layout, and some other images for the website. These imagas can be quite large. I work on these images from time to time and so they change. I hardly never need the old image again, so is this not just taking up precious storage space. I would highly appreciate just some basic recommendation on this topic.

    Read the article

  • Why Backbone.js isn't binding my event

    - by Saif Bechan
    I have a router like this, as main entry point: window.AppRouter = Backbone.Router.extend({ routes: { '': 'login' }, login: function(){ userLoginView = new UserLoginView(); } }); var appRouter = new AppRouter; Backbone.history.start({pushState: true}); I have a model/collection/view like this: window.User = Backbone.Model.extend({}); window.Users = Backbone.Collection.extend({ model: User }); window.UserLoginView = Backbone.View.extend({ events: { 'click #login-button': 'loginAction' }, initialize: function(){ _.bindAll(this, 'render', 'loginAction'); }, loginAction: function(){ var uid = $("#login-username").val(); var pwd = $("#login-password").val(); var user = new User({uid:uid, pwd:pwd}); } }); And body of my HTML looks like this: <form action="#" method="POST" id="login-form"> <p> <label for="login-username">username</label> <input type="text" id="login-username" autofocus /> </p> <p> <label for="login-password">password</label> <input type="password" id="login-password" /> </p> <a id="login-button" href="#">Inloggen</a> </form> Note: The HTML comes from Node.js using express.js, should I maybe wait for a document ready event somewhere? Edit: I have tried this, create the view when ready, did not solve the problem. $(function(){ userLoginView = new UserLoginView(); });

    Read the article

  • What is the best way to make versioned files available for download

    - by Saif Bechan
    I have a small PHP framework which I want to make available for download. It is located in a git repository. But the last version is not always the one that I want to make available for download. Is there some place I can make the versions available for download. Another thing about this framework is that I bring out additional components for the framework. These also have different versions. Is there somewhere where I can add the whole project, and people can browse trough everything and download what they need. Or should I make this myself?

    Read the article

  • Best way of creating lite and extended version of Git project

    - by Saif Bechan
    I have made a little framework for php. In this project I have the basic functionalities that I use for most of my projects. I have also inserted some sample data so I do not forget how it all works again. I have put the framework under version control using git. Everything works fine now and I want to further build on this. This is my first git project so I do not know which method I should use. Ok the first thing I want to do is creating 2 more versions of the project. As I explained before the version I have now has some sample data inside it. So the first version I want to create is a stripped down version, removing the sample data. I can use this version to create any new project. The second version I want to create is an extended version. This has the lite version, combined with the sample data, plus some more extensions on it. So in the end I have 3 version of the same project, small medium and large. Now what is the best way of doing this. Should I create 3 repositories for this, or can I use just one repository for all the versions.

    Read the article

  • What is the role of the Router Object in MVC based frameworks

    - by Saif Bechan
    In most MVC based framework I see a router object. If I look at it splits up the uri and decides what controller should be used, and which action should be fired. Even though this makes a lot of sense, I can not give this a place in the MVC patern. Is splitting up the uri not the job of the controller. And then the controller should just decide which class and function to run.

    Read the article

  • Moving Javascript object with all bounded events to other variable

    - by Saif Bechan
    Let's say I have an anchor tag, with some events. <a id="clickme" href="/endpoint">clickme</a> <a id="clickme2" href="/endpoint2">clickme2</a> Let's use jquery for simplicity: $('#clickme').on('click', function(){.....}) I also have a variable: var myActiveVar = $('#clickme'); When I want to remove the element an every trace of it I can do this: myActiveVar.off().remove(); Here comes the problem, I want to reuse the variable. Something like this: var oldAcriveVar = myActiveVar; myActiveVar = $('#clickme2'); // Now I want to do some operations // both of the elements are still on // the page, when I'm done: oldActiveVar.off().remove(); Comeplete code: var myActiveVar = $('#clickme'); // Operate on myActiveVar var oldAcriveVar = myActiveVar; myActiveVar = $('#clickme2'); // Operate on myActiveVar which is // the new element. // Old element stays visible oldActiveVar.off().remove(); // Old element and all traces are gone Edit: Maybe the above code will work, but my problem goes beyond. I just gave a simplified example. I am using Backbone events that are bounded to object. They need to be removed when I am done with the object.

    Read the article

  • Exciting new Evented I/O technologies

    - by Saif Bechan
    Lately I have been having my eye on evented I/O to tackle some of my web application problems. I have been looking at things as Python's Twisted, Ruby's Eventmachine, and Node.js. Are there any other alternatives to these three, maybe in other languages as PHP ?

    Read the article

  • Subconic3.0 with winform app

    - by Saif Khan
    Can subsonic 3.0 be used with a winform app? Do I need to add any references to the system.web? If it can be done, how can I exclude certain tables in the DB? Can I use the following whih I am using for subsonic 2.0 <providers> <!--<clear/>--> <add name="TEST" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="myString" includeTableList="CustomerReference" includeProcedureList=""/> </providers>

    Read the article

  • How to creating code highlighted blocks on your website

    - by Saif Bechan
    I have written a small PHP framework and I want to make a website where I explain some basic features. I want to display blocks of php code. Is there an easy to do this, preferably without JavaScript. I want to have section kind of like displayed below: // This function takes in a value and return it public function getname($name){ return $name; }

    Read the article

  • Calling a method with an array value in PHP

    - by Saif Bechan
    I have a class like this class someclass{ public function somemethod(){} } Now I have an array: $somearray['someclass'] = new someclass(); $somearray['somemethod'] = 'somemethod'; How can I fire them, I tried the following: $somearray['someclass']->$somearray['somemethod'](); usign this I get the following error: Fatal error: Method name must be a string in ...................... Anyone have an idea on how to do this?

    Read the article

  • Efficiently store last X items in an MySQL Database

    - by Saif Bechan
    I want to store the last 3 items in an MySQL database in an efficient way. So when the 4th item is stored the first should be deleted. The way I do this not is first run a query getting the items. Than check what I should do then insert/delete. There has to be a better way to do this. Any suggestions?

    Read the article

  • comparing dates in c# taking null value into account

    - by Saif
    Hi I am new to c#. I am comparing two dates where one is entered by user and the other one is sytem date time. i have the code working as it stands where the obstacle has occured is how to cater for null values. the basic code I have is: if (mydate.ToShortDateString() != TodaysDate.ToShortDateString()) { //Error Messaage } else { //do some code } Any feedback will be appreciated

    Read the article

< Previous Page | 5 6 7 8 9 10  | Next Page >