Search Results

Search found 586 results on 24 pages for 'mohammad ali'.

Page 12/24 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • combine 2 files with AWK based last colums

    - by mohammad reshad
    i have two files file1 ------------------------------- 1 a t p b 2 b c f a 3 d y u b 2 b c f a 2 u g t c 2 b j h c file2 -------------------------------- 1 a b 2 p c 3 n a 4 4 a i want combine these 2 files based last columns (column 5 of file1 and column 3 of file2) using awk result ---------------------------------------------- 1 a t p 1 a b 2 b c f 3 n a 2 b c f 4 4 a 3 d y u 1 a b 2 b c f 3 n a 2 b c f 4 4 a 2 u g t 2 p c 2 b j h 2 p c

    Read the article

  • angular bootstrap typeahead bug

    - by Mohammad Akbari
    i use angular bootstrap typeahead (this lib ui-bootstrap-tpls.js ) in my app, when use two typeahead in one scope, only one work well, and other not work, this is my code angular.module('plunker', ['ui.bootstrap']); function TypeaheadCtrl($scope) { $scope.selected = undefined; $scope.selected2 = undefined; $scope.states = ['Alabama', 'Alaska','California', 'Hawaii', 'Wisconsin', 'Wyoming']; } <html ng-app="plunker"> <head> <title></title> <link href="lib/angular-bootstrap/bootstrap.css" rel="stylesheet" /> <script src="lib/angular/angular.js"></script> <script src="lib/angular-bootstrap/ui-bootstrap-tpls-0.3.0.min.js"></script> <script src="app.js"></script> </head> <body> <div class='container-fluid' ng-controller="TypeaheadCtrl"> <pre>Model: {{selected| json}}</pre> <input type="text" ng-model="selected" typeahead="state for state in states | filter:$viewValue"> <input type="text" ng-model="selected2" typeahead="state for state in states | filter:$viewValue"> </div> </body> please check this and help.

    Read the article

  • How to add dimensions to dynamic img elements (Updated)

    - by Mohammad
    I use a Json call to get a list of image addresses, then I add them individually to a div like this. Unfortunately the image dimension is not part of the Json information. <div id="container"> <img src="A.jpg" alt="" /> <img src="B.jpg" alt="" /> ... </div> Do any of you JQuery geniuses know of a code that would flawlessly and dynamically add the true Width and Height to each img element in the container as soon as each individual one is rendered? I was thinking maybe the code could do a image width check width > 0 to evaluate when the image has actually been rendered, then fire. But I wouldn't know how to go about that and make it work stably. How is the best way of going about this? Thank you so much! Update, As the answers point out, adding Width or Height to the elements is pretty routine. The problem here is actually writing a code that would know when to do that. And evaluate that condition for each image not the page as a whole.

    Read the article

  • Regex pattern help (I almost have it, just need a bit of expertise to finish it)

    - by Mohammad
    I need to match two cases js/example_directory/example_name.js and js/example_directory/example_name.js?12345 (where 12345 is a digit string of unknown length and the directory can be limitless in depth or not exist at all) I need to capture in both cases everything between js/ and .js and if ? exists capture the digit string after ? This is what I have so far ^js/(.*).js\??(\d+)? This works except it also captures js/example_directory/example_name.js12345 I want the regex to ignore that. Any suggestions? Thank you all! Test your patterns here

    Read the article

  • [Facebook Graph API - Android] I want to know the HTTPSConnection redirected to which URL?

    - by Mohammad Abdelaziz
    I am building an application that uses the Facebook Graph API. To get the access token I should send the following request https://graph.facebook.com/oauth/authorize? client_id=...& redirect_uri=http://www.example.com/callback It redirects to the redirect_uri with the code to be used as access token. How can I capture that the HttpsURLConnection is redirected and how to get the code? Is it possible or I need to have server that gets the access token?

    Read the article

  • not work jquery for for input value

    - by Mohammad
    main code : var clone = div.clone(); clone.attr('id', sabad_kala_id); $('.content').append(clone); $('div#'+sabad_kala_id).replaceWith('<tr id='+sabad_kala_id+'><td width="50"><a class="del_kala" id='+sabad_kala_id+'><img src="images/delete.png" alt="delete" /></a></td><td width="50">1.</td><td width="388">'+title+'</td><td width="80" clas="mm"><input class="count" type="text" value='+count+' /></td><td width="100">'+price+' $</td><td width="120">'+price_count+' $</td></tr>'); and this code run perfect after append and replace , user can edit input.count in table and below code have run : ('input.count').keyup(function(e){ alert(test); }); but this code not work :(

    Read the article

  • Change English numbers to Persian and vice versa in MVC (httpmodule)?

    - by Mohammad
    I wanna change all English numbers to Persian for showing to users. and change them to English numbers again for giving all requests (Postbacks) e.g: we have something like this in view IRQ170, I wanna show IRQ??? to users and give IRQ170 from users. I know, I have to use Httpmodule, But I don't know how ? Could you please guide me? Edit : Let me describe more : I've written the following http module : using System; using System.Collections.Specialized; using System.Diagnostics; using System.IO; using System.Text; using System.Text.RegularExpressions; using System.Web; using System.Web.UI; using Smartiz.Common; namespace Smartiz.UI.Classes { public class PersianNumberModule : IHttpModule { private StreamWatcher _watcher; #region Implementation of IHttpModule /// <summary> /// Initializes a module and prepares it to handle requests. /// </summary> /// <param name="context">An <see cref="T:System.Web.HttpApplication"/> that provides access to the methods, properties, and events common to all application objects within an ASP.NET application </param> public void Init(HttpApplication context) { context.BeginRequest += ContextBeginRequest; context.EndRequest += ContextEndRequest; } /// <summary> /// Disposes of the resources (other than memory) used by the module that implements <see cref="T:System.Web.IHttpModule"/>. /// </summary> public void Dispose() { } #endregion private void ContextBeginRequest(object sender, EventArgs e) { HttpApplication context = sender as HttpApplication; if (context == null) return; _watcher = new StreamWatcher(context.Response.Filter); context.Response.Filter = _watcher; } private void ContextEndRequest(object sender, EventArgs e) { HttpApplication context = sender as HttpApplication; if (context == null) return; _watcher = new StreamWatcher(context.Response.Filter); context.Response.Filter = _watcher; } } public class StreamWatcher : Stream { private readonly Stream _stream; private readonly MemoryStream _memoryStream = new MemoryStream(); public StreamWatcher(Stream stream) { _stream = stream; } public override void Flush() { _stream.Flush(); } public override int Read(byte[] buffer, int offset, int count) { int bytesRead = _stream.Read(buffer, offset, count); string orgContent = Encoding.UTF8.GetString(buffer, offset, bytesRead); string newContent = orgContent.ToEnglishNumber(); int newByteCountLength = Encoding.UTF8.GetByteCount(newContent); Encoding.UTF8.GetBytes(newContent, 0, Encoding.UTF8.GetByteCount(newContent), buffer, 0); return newByteCountLength; } public override void Write(byte[] buffer, int offset, int count) { string strBuffer = Encoding.UTF8.GetString(buffer, offset, count); MatchCollection htmlAttributes = Regex.Matches(strBuffer, @"(\S+)=[""']?((?:.(?![""']?\s+(?:\S+)=|[>""']))+.)[""']?", RegexOptions.IgnoreCase | RegexOptions.Multiline); foreach (Match match in htmlAttributes) { strBuffer = strBuffer.Replace(match.Value, match.Value.ToEnglishNumber()); } MatchCollection scripts = Regex.Matches(strBuffer, "<script[^>]*>(.*?)</script>", RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace); foreach (Match match in scripts) { MatchCollection values = Regex.Matches(match.Value, @"([""'])(?:(?=(\\?))\2.)*?\1", RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace); foreach (Match stringValue in values) { strBuffer = strBuffer.Replace(stringValue.Value, stringValue.Value.ToEnglishNumber()); } } MatchCollection styles = Regex.Matches(strBuffer, "<style[^>]*>(.*?)</style>", RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace); foreach (Match match in styles) { strBuffer = strBuffer.Replace(match.Value, match.Value.ToEnglishNumber()); } byte[] data = Encoding.UTF8.GetBytes(strBuffer); _memoryStream.Write(data, offset, count); _stream.Write(data, offset, count); } public override string ToString() { return Encoding.UTF8.GetString(_memoryStream.ToArray()); } #region Rest of the overrides public override bool CanRead { get { throw new NotImplementedException(); } } public override bool CanSeek { get { throw new NotImplementedException(); } } public override bool CanWrite { get { throw new NotImplementedException(); } } public override long Seek(long offset, SeekOrigin origin) { throw new NotImplementedException(); } public override void SetLength(long value) { throw new NotImplementedException(); } public override long Length { get { throw new NotImplementedException(); } } public override long Position { get { throw new NotImplementedException(); } set { throw new NotImplementedException(); } } #endregion } } It works well, but It converts all numbers in css and scripts files to Persian and it causes error.

    Read the article

  • Unknown Entity namespace alias in symfony2

    - by Zoha Ali Khan
    Hey I have two bundles in my symfony2 project. one is Bundle and the other one is PatentBundle. My app/config/route.yml file is MunichInnovationGroupPatentBundle: resource: "@MunichInnovationGroupPatentBundle/Controller/" type: annotation prefix: / defaults: { _controller: "MunichInnovationGroupPatentBundle:Default:index" } MunichInnovationGroupBundle: resource: "@MunichInnovationGroupBundle/Controller/" type: annotation prefix: /v1 defaults: { _controller: "MunichInnovationGroupBundle:Patent:index" } login_check: pattern: /login_check logout: pattern: /logout inside my controller i have <?php namespace MunichInnovationGroup\PatentBundle\Controller; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; use JMS\SecurityExtraPatentBundle\Annotation\Secure; use Symfony\Component\Security\Core\Exception\AccessDeniedException; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Component\Security\Core\SecurityContext; use MunichInnovationGroup\PatentBundle\Entity\Log; use MunichInnovationGroup\PatentBundle\Entity\UserPatent; use MunichInnovationGroup\PatentBundle\Entity\PmPortfolios; use MunichInnovationGroup\PatentBundle\Entity\UmUsers; use MunichInnovationGroup\PatentBundle\Entity\PmPatentgroups; use MunichInnovationGroup\PatentBundle\Form\PortfolioType; use MunichInnovationGroup\PatentBundle\Util\SecurityHelper; use Exception; /** * Portfolio controller. * @Route("/portfolio") */ class PortfolioController extends Controller { /** * Index action. * * @Route("/", name="v2_pm_portfolio") * @Template("MunichInnovationGroupPatentBundle:Portfolio:index.html.twig") */ public function indexAction(Request $request) { $portfolios = $this->getDoctrine() ->getRepository('MunichInnovationGroupPatentBundle:PmPortfolios') ->findBy(array('user' => '$user_id')); // rest of the method } when i try to load localhost/web/app_dev.php/portfolio It says Unknown Entity namespace alias 'MunichInnovationGroupPatentBundle'. I am unable to figure out this error please help me if anyone has any idea I googled it a lot :( Thanks in advance 500 Internal Server Error - ORMException

    Read the article

  • Ant and Flex-4 problem, MXMLC.jar not found !

    - by Ali
    Hi all, I updated a flex application from flex 3.5 to flex 4.0. We are using ant for compiling our project and we have a mxmlc task to handle the flex part. After the upgrade, our mxmlc task broke. Here is the task definition: <taskdef resource="flexTasks.tasks"> <classpath> <pathelement path="${FLEX_HOME}/ant/lib/flexTasks.jar"/> <pathelement path="${FLEX_HOME}/lib/flexTasks.jar"/> <fileset dir="${FLEX_HOME}/lib"> <include name="**/*.jar"/> </fileset> </classpath> </taskdef> And here is mxmlc task <mxmlc file="${src}/Main.mxml" output="${build}/main.swf" debug="true" target-player="10" services="../src/main/webapp/WEB-INF/flex/services-config.xml" context-root="/" > <compiler.library-path dir="${lib}"> <include name="*.swc"/> </compiler.library-path> <compiler.library-path dir="${FLEX_HOME}/frameworks/libs"> <include name="*.swc"/> </compiler.library-path> <compiler.library-path dir="${FLEX_HOME}/frameworks/libs/player/10.0"> <include name="*.swc"/> </compiler.library-path> <compiler.library-path dir="${FLEX_HOME}/frameworks/locale"> <include name="**/*"/> </compiler.library-path> </mxmlc> And we are getting: The class not found in jar file: mxmlc.jar I checked the ${FLEX_HOME}/lib folder and I can see the mxmlc.jar file there. I appreciate your comments for resolving this matter, Thanks, -A

    Read the article

  • iPhone OpenGL ES - How to Pick

    - by Ali Nadalizadeh
    I'm working on an OpenGL ES1 app which displays a 2D grid and allows user to navigate and scale/rotate it. I need to know the exact translation of View Touch coordinates into my opengl world and grid cell. Are there any helpers to do the reverse of last few transforms which I do for navigation ? or I should calculate and do the matrix stuff by hand ?

    Read the article

  • jetty-blazeds and maven (com.adobe.flex#flex-messaging-core missing)

    - by Ali
    Hi all, I want to setup jetty with jetty-blazeds extension. Everything looks fine but when I run maven to get the dependencies, I get: UNRESOLVED DEPENDENCIES com.adobe.flex#flex-messaging-core;3.2.0: not found com.adobe.flex#flex-messaging-common;3.2.0: not found Does anyone know a maven repository that contains these dependencies ? Thank you, -A

    Read the article

  • SQL Server 2008 to SQL Server 2008

    - by Sakhawat Ali
    I have an MDF and LDF file of SQL Server 2005. i attached it with SQL Server 2008 and did some change in data. now when i attached it back to sql server 2005 Express Edition it gives version error. The database 'E:\DB\JOBPERS.MDF' cannot be opened because it is version 655. This server supports version 612 and earlier. A downgrade path is not supported. Could not open new database 'E:\DB\JOBPERS.MDF'. CREATE DATABASE is aborted. An attempt to attach an auto-named database for file E:\DB\Jobpers.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

    Read the article

  • Extract news links from news website

    - by Ali
    Is there any reliable method to find out the collection of links which is directed us to detail news page. in other word after visiting the first page of website I just want those links that refer to a news item. any solution ?

    Read the article

  • Xsd2code not working in VS 2008

    - by Ali Khalid
    Hi, I am trying to use Xsd2Code but the addin does not show up when I right click an xsd file in the solution explorer. The installation goes smoothly without any glitch but still I am not able to see or use the addin VS 2008. My OS is Vista x64. Any help will be much appreciated.

    Read the article

  • Nested AccordionItem. Inner AccordionItem do not expand.

    - by Ali
    In Silverlight an AccordionItem is inside another one . When the inner one is selected, it can not expand its parent more which is already expanded to show its own content. I tried to get around it by templating but I was unlucky. Does any one has a solution for it [prefer a solution without code]? <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:layoutPrimitivesToolkit="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Layout.Toolkit" xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit" xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="NestedAccordion_Silverlight.MainPage" Width="640" Height="480"> <Grid x:Name="LayoutRoot" Background="White"> <layoutToolkit:Accordion BorderBrush="#FF00FF53" SelectionMode="ZeroOrMore"> <layoutToolkit:AccordionItem Header="Header" VerticalAlignment="Top" > <StackPanel VerticalAlignment="Top"> <TextBlock TextWrapping="Wrap" Text="Some content"/> <Button Content="Button" Width="75"/> <layoutToolkit:AccordionItem Header="Inner Accordion1" VerticalAlignment="Top" > <StackPanel VerticalAlignment="Top"> <TextBlock TextWrapping="Wrap" Text="Some content"/> <Button Content="Button" Width="75"/> </StackPanel> </layoutToolkit:AccordionItem> </StackPanel> </layoutToolkit:AccordionItem> <layoutToolkit:AccordionItem Header="Header" VerticalAlignment="Top" > <StackPanel> <TextBlock TextWrapping="Wrap" Text="Some content"/> <Button Content="Button" Width="75"/> </StackPanel> </layoutToolkit:AccordionItem> <layoutToolkit:AccordionItem Header="Header" VerticalAlignment="Top" > <StackPanel> <TextBlock TextWrapping="Wrap" Text="Some content"/> <Button Content="Button" Width="75"/> </StackPanel> </layoutToolkit:AccordionItem> </layoutToolkit:Accordion> </Grid> Is it a bug or I am in a wrong path?

    Read the article

  • NSUserDefaults in monotouch

    - by Ali Shafai
    I'm very impressed with MonoTouch.Dialog by Miguel. inspired by his simple approach I thought it would be very nice to have a reflection based NSUserDefaults class that works seamlessly by marking certain properties as "persistable in user defaults" and forget about the rest. something like this: public class SomeController { [PersistInUserSettings] public string LastPostUserRead { get; set; } } I don't like the LastPostUserRead to be of type "UserSetting", I like it to be a normal property so that later I can assign to it like: LastPostUserRead = "Post 1"; and not like: LastPostUserRead.SetValue("Post 1"); Any idea on how to implement it (without Reflection.Emit) in monotouch?

    Read the article

  • Installing flex on Mac Parallels

    - by Ali Syed
    Hello folks, I am trying to install Flex 3 on my Windows 7 Virtual machine (parallels desktop) on my Mac Pro. The problem seems to be some sort of conflict between the copy of Flex 3 Builder installed on Mac OS X. The installer tries to install Flex in x:/Program Files/Adobe/Flex Builder 3/ but since Parallels Desktop connects all directories, there resides the Flex Builder 3 installation of MAC. I get this error Log: !SESSION 2010-04-22 16:09:23.031 ----------------------------------------------- eclipse.buildId=unknown java.version=1.5.0_11 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE Framework arguments: -application org.eclipse.update.core.standaloneUpdate -command install -from file:\C:\Program Files\Adobe\Flex Builder 3 Windose\com.adobe.flexbuilder.update.site/ -featureId com.adobe.flexbuilder.feature.standalone -version 3.0.214193 Command-line arguments: -application org.eclipse.update.core.standaloneUpdate -command install -from file:\C:\Program Files\Adobe\Flex Builder 3 Windose\com.adobe.flexbuilder.update.site/ -featureId com.adobe.flexbuilder.feature.standalone -version 3.0.214193 !ENTRY org.eclipse.update.core 4 0 2010-04-22 16:09:29.187 !MESSAGE Cannot install featurecom.adobe.flexbuilder.feature.standalone 3.0.214193

    Read the article

  • Is fckeditor free for use in freelance projects?

    - by Ali
    This is more of a licencing issue than a code question. I really like the ckeditor editor and would like to use it in my freelance projects which I do for clients. However upon reading the license page it has me in a bit of a confusion. DO I have to buy licences if I intend to use this in cms websites that I build myself and hand over to clients? If so then what are my alternate options which don't cost anything?

    Read the article

  • Client asked for internet radio on his website

    - by Ali
    Hi guys, I have a freelance job for a php site. The client isn't a tech savy guy he says he would like to have internet radio on his website as well. Now the thing is that when we speak of internet radio what are we actually talking about? My client himself has no idea of what internet radio is aside form listening to streaming mp3s on a flash player embedded on a website. I don't think my client would be ready to set up a radio station or so.. I have to give my client a report on what can and cannot be done. So I'm looking for the simplest solution possible that would pass off as internet radio...

    Read the article

  • monodevelop code formatting

    - by Ali Shafai
    I'm using monodevelop on my mac to develop for iPhone. I was wondering if there is a way to change how MD formats C# code? by default it puts the curly braces as the same like as the if which I personally don't like....

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >