Search Results

Search found 6 results on 1 pages for 'avar'.

Page 1/1 | 1 

  • after upgrade from 10.04 to 10.10, no keyboard, cannot login

    - by avar
    Hello, just did upgrade from kubuntu 10.04 to 10.10.. after all done and reboot, when the login box shows up, my keyboard and laptop pad ( mouse ) dosn't work, (plugged in the usb mouse, it works sometimes) but never keyboard. i went to recovery , the boot hung up when it says : [ 17.704053] EXT4-fs (sda9): mounted filesystem with ordered data mode Begin: Running /scripts/local-bottom ... Done. Done. Begin: Running /scripts/init-bottom ... Done. stuck here. nothing works except ctrl+alt+del i tried booting from livecd and update-grub, also tried booting manually from grub command line, everytime it stuck at lines above .. so it's not grub problem . how to solve this ? if it is important, i have ATI mobility radeon HD 5470 card .

    Read the article

  • How can I display the clicked products by user on a list in another view?

    - by Avar
    I am using MVC3 Viewmodel pattern with Entity Framework on my webbapplication. My Index View is list of products with image, price and description and etc. Products with the information I mentioned above is in div boxes with a button that says "buy". I will be working with 2 views one that is the Index View that will display all the products and the other view that will display the products that got clicked by the buy button. What I am trying to achieve is when a user click on buy button the products should get stored in the other view that is cart view and be displayed. I have problems on how to begin the coding for that part. The index View with products is done and now its the buy button function left to do but I have no idea how to start. This is my IndexController: private readonly HomeRepository repository = new HomeRepository(); public ActionResult Index() { var Productlist = repository.GetAllProducts(); var model = new HomeIndexViewModel() { Productlist = new List<ProductsViewModel>() }; foreach (var Product in Productlist) { FillProductToModel(model, Product); } return View(model); } private void FillProductToModel(HomeIndexViewModel model, ProductImages productimage) { var productViewModel = new ProductsViewModel { Description = productimage.Products.Description, ProductId = productimage.Products.Id, price = productimage.Products.Price, Name = productimage.Products.Name, Image = productimage.ImageUrl, }; model.Productlist.Add(productViewModel); } In my ActionResult Index I am using my repository to get the products and then I am binding the data from the products to my ViewModel so I can use the ViewModel inside my view. Thats how I am displaying all the products in my View. This is my Index View: @model Avan.ViewModels.HomeIndexViewModel @foreach (var item in Model.Productlist) { <div id="productholder@(item.ProductId)" class="productholder"> <img src="@Html.DisplayFor(modelItem => item.Image)" alt="" /> <div class="productinfo"> <h2>@Html.DisplayFor(modelItem => item.Name)</h2> <p>@Html.DisplayFor(modelItem => item.Description)</p> @Html.Hidden("ProductId", item.ProductId, new { @id = "ProductId" }) </div> <div class="productprice"> <h2>@Html.DisplayFor(modelItem => item.price)</h2> <input type="button" value="Läs mer" class="button" id="button@(item.ProductId)"> @Html.ActionLink("x", "Cart", new { id = item.ProductId }) // <- temp its going to be a button </div> </div> } Since I can get the product ID per product I can use the ID in my controller to get the data from the database. But I still I have no idea how I can do that so when somebody click on the buy button I store the ID where? and how do I use it so I can achieve what I want to do? Right now I have been trying to do following thing in my IndexController: public ActionResult cart(int id) { var SelectedProducts = repository.GetProductByID(id); return View(); } What I did here is that I get the product by the id. So when someone press on the temp "x" Actionlink I will recieve the product. All I know is that something like that is needed to achieve what im trying to do but after that I have no idea what to do and in what kind of structure I should do it. Any kind of help is appreciated alot! Short Scenario: looking at the Index I see 5 products, I choose to buy 3 products so I click on three "Buy" buttons. Now I click on the "Cart" that is located on the nav menu. New View pops up and I see the three products that I clicked to buy.

    Read the article

  • delphi app freezes whole win7 system

    - by avar
    Hello i have a simple program that sorts a text file according to length of words per line this program works without problems in my xp based old machine now i run this program on my new win7/intel core i5 machine, it freezes whole system and back normal after it finishes it's work. i'v invastigated the code and found the line causing the freeze it was this specific line... caption := IntToStr(i) + '..' + IntTostr(ii); i'v changed it to caption := IntTostr(ii); //slow rate change and there is no freeze and then i'v changed it to caption := IntTostr(i); //fast rate change and it freeze again my main complete procedure code is var tword : widestring; i,ii,li : integer; begin tntlistbox1.items.LoadFromFile('d:\new folder\ch.txt'); tntlistbox2.items.LoadFromFile('d:\new folder\uy.txt'); For ii := 15 Downto 1 Do //slow change Begin For I := 0 To TntListBox1.items.Count - 1 Do //very fast change Begin caption := IntToStr(i) + '..' + IntTostr(ii); //problemetic line tword := TntListBox1.items[i]; LI := Length(tword); If lI = ii Then Begin tntlistbox3.items.Add(Trim(tntlistbox1.Items[i])); tntlistbox4.items.Add(Trim(tntlistbox2.Items[i])); End; End; End; end; any idea why ? and how to fix it? i use delphi 2007/win32

    Read the article

  • how to add language support to android

    - by avar
    hello i hope someone put me on the right direction with my problem i want to work on supporting my language, specially the writing on android we use Arabic characters with little modification ( like parsi, urdu etc).. i was hoping android has fully supported Arabic , then i would make changes to work with my language. but even 2.2 dosn't support Arabic . it just show Arabic characters and it is not connected. that is "????? " is displayed "? ? ? ? ?". some individuals have made Arabic support on CyanogenMod ROM's for some HTC phones, but they would not tell how they made it. I'v got the android source code, i want to know where to start, where to make changes , what is the library that handle fonts , shaping engine etc .. ps : android.com and other android related google groups are blocked in my country.

    Read the article

  • encapsulation in python list (want to use " instead of ')

    - by Codehai
    I have a list of users users["pirates"] and they're stored in the format ['pirate1','pirate2']. If I hand the list over to a def and query for it in MongoDB, it returns data based on the first index (e.g. pirate1) only. If I hand over a list in the format ["pirate1","pirate"], it returns data based on all the elements in the list. So I think there's something wrong with the encapsulation of the elements in the list. My question: can I change the encapsulation from ' to " without replacing every ' on every element with a loop manually? Short Example: aList = list() # get pirate Stuff # users["pirates"] is a list returned by a former query # so e.g. users["pirates"][0] may be peter without any quotes for pirate in users["pirates"]: aList.append(pirate) aVar = pirateDef(aList) print(aVar) the definition: def pirateDef(inputList = list()): # prepare query col = mongoConnect().MYCOL # query for pirates Arrrr pirates = col.find({ "_id" : {"$in" : inputList}} ).sort("_id",1).limit(50) # loop over users userList = list() for person in pirates: # do stuff that has nothing to do with the problem # append user to userlist userList.append(person) return userList If the given list has ' encapsulation it returns: 'pirates': [{'pirate': 'Arrr', '_id': 'blabla'}] If capsulated with " it returns: 'pirates' : [{'_id': 'blabla', 'pirate' : 'Arrr'}, {'_id': 'blabla2', 'pirate' : 'cheers'}] EDIT: I tried figuring out, that the problem has to be in the MongoDB query. The list is handed over to the Def correctly, but after querying pirates only consists of 1 element... Thanks for helping me Codehai

    Read the article

  • Static constructor can run after the non-static constructor. Is this a compiler bug?

    - by Joe H
    The output from the following program is: Non-Static Static Non-Static Is this a compiler bug? I expected: Static Non-Static Non-Static because I thought the static constructor was ALWAYS called before the non-static constructor. I tested this with Visual Studio 2010 using both .net 3.5 and .net 4.0. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace StaticConstructorBug { class Program { static void Main(string[] args) { var mc = new MyClass(); Console.ReadKey(); } } public class MyClass { public MyClass() { Console.WriteLine("Non-static"); } static MyClass() { Console.WriteLine("Static"); } public static MyClass aVar = new MyClass(); } }

    Read the article

1