Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

jasonalien

@jasonalien
About
Posts
20
Topics
13
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to reach a file under a folder inside a solution in VS C#
    J jasonalien

    In my project, there is a folder called "Resources" and there is an Excel file called "query.xlsx" inside that folder. I try to load Excel file like this :

    ExcelFile ef = ExcelFile.Load(HttpContext.Current.Server.MapPath("~/Resources/query.xlsx"));

    And I get this exception : HttpContext.Current.Server = 'HttpContext.Current.Server' threw an exception of type 'System.NullReferenceException' How can I load that Excel file properly? Thanks.

    C#

  • How to resize layouts by swiping up and down
    J jasonalien

    I have shared the problem and the source code. Can you tell me what I'm missing? Thanks.

    Android question tutorial

  • How to resize layouts by swiping up and down
    J jasonalien

    Thank you for your answer, but your example doesn't answer my problem.

    Android question tutorial

  • How to resize layouts by swiping up and down
    J jasonalien

    Hello all, I have two layouts, one is below the other one. When user swipes down, I want upper layout to be bigger, and lower layout to be smaller and vice versa for when user swipes up. How can I achieve that? Here is my layout :

    Android question tutorial

  • Drawing dashed line on Android Programmatically
    J jasonalien

    I want to draw horizontal dashed lines programmatically between programmatically generated TextViews. I found this code on Internet:

                Paint fgPaintSel = new Paint();
                fgPaintSel.setARGB(255, 0, 0, 0);
                fgPaintSel.setStyle(Paint.Style.STROKE);
                fgPaintSel.setPathEffect(new DashPathEffect(new float\[\]{5, 10}, 0));
    

    I just copied and pasted this code but nothing happened. What should I do to draw a dashed line? Thanks.

    Android android graphics question

  • How to give path in Android
    J jasonalien

    I'm trying to display gif images on Android. This is my code to display a.gif :

        WebView wView = new WebView(this);
        wView.loadUrl("android.resource://" + getPackageName() + "/" + R.drawable.a);
        setContentView(wView);
    

    But I get this : The webpage at android.resource://com.example.mypc.myapp/2497475928917 could not be loaded because : net::ERR_UNKNOWN_URL_SCHEME My gif files are in drawable and raw folder under res folder. Can you tell me how to give paths of gifs correctly? Thanks in advance.

    Android tutorial android com question learning

  • How to store large data in an Android application
    J jasonalien

    Hello all, I have made a dictionary app that communicates with a database in a server using a webservice. Now my boss wants me to embed the database inside the app so that offline users can also use the dictionary. Can you give me some advices on how to do that? How can I add whole database inside an app? Should I create an XML for each database table? Is SQLite an option? I'm open to any advices and suggestions. Thanks in advance.

    Android question android database sqlite sysadmin

  • How to implement unlimited number of text views
    J jasonalien

    I have built a dictionary WEB app using ASP.NET. While building web app, I was using any number of html tags using loops for the meanings of different words. Some words have 20 meanings, some have fewer, some of them have only 1 meaning. My question is how I can use the same functionality in Android? AFAIK, I use fixed number of textviews in Android which are declared in XML. So what should I use for handling any number of meanings in this case? Thanks in advance.

    Android question csharp html asp-net android

  • What to do if I want to return rows from different tables in ASP.NET WebService
    J jasonalien

    Thank you very much for your reply. Can you tell me how I should make Android could handle List< Customer >? A sample code would be great. Moreover is it a good idea to send List< Customer > and List< Order > at the same time? Thanks a lot.

    C# csharp asp-net android question

  • What to do if I want to return rows from different tables in ASP.NET WebService
    J jasonalien

    I am trying to make and Android app with ASP.NET WebService. In WebService, if I want to return values from a single table I know what to do :

    public DataTable GetUserDetails(string userName)
    {
    ....
    return userDetailsTable;
    }

    But I don't know what to do if I want to return values from different tables (a more complex data). Should I use

    List

    or something else? If I use

    List

    , how should I handle it in Android side? Thanks.

    C# csharp asp-net android question

  • RLDC Report error : An error occurred during report processing.
    J jasonalien

    I'm trying to generate a simple report based on this article : www.dotnetawesome.blogspot.com/2013/09/microsoft-report-in-mvc-4.html[^] Here is my controller

    public ActionResult Report(string id)
    {
    LocalReport lr = new LocalReport();
    string path = Path.Combine(Server.MapPath("~/Report"), "Person.rdlc");
    if (System.IO.File.Exists(path))
    {
    lr.ReportPath = path;
    }
    else
    {
    return View("Index");
    }
    List cm = new List();

            var viewModel = new PersonIndexData();
    
            viewModel.People= db.Person
            .Include(k => k.Groups)
            .OrderBy(k => k.Name);
    
            cm = viewModel.People.ToList();
    
            ReportDataSource rd = new ReportDataSource("PersonDataSet", cm);
            lr.DataSources.Add(rd);
            string reportType = id;
            string mimeType;
            string encoding;
            string fileNameExtension;
    
    
            string deviceInfo =
    
            "" +
            "  " + id + "" +
            "  8.5in" +
            "  11in" +
            "  0.5in" +
            "  1in" +
            "  1in" +
            "  0.5in" +
            "";
    
            Warning\[\] warnings;
            string\[\] streams;
            byte\[\] renderedBytes;
    
            renderedBytes = lr.Render(
                reportType,
                deviceInfo,
                out mimeType,
                out encoding,
                out fileNameExtension,
                out streams,
                out warnings);
    
    
            return File(renderedBytes, mimeType);
        }
    

    When I type (mysite/person/report/pdf), I get this exception : An error occurred during report processing. At this part :

        renderedBytes = lr.Render(
            reportType,
            deviceInfo,
            out mimeType,
            out encoding,
            out fileNameExtension,
            out streams,
            out wa
    
    C# database html asp-net com sysadmin

  • Partial Authentication in ASP.NET MVC5
    J jasonalien

    Hello, I'm pretty new to ASP.NET.. I'm creating Models using EF, and then creating controllers and views automatically, which is great. What I want to achieve is that, I want unregistered users not to see create new/Delete/update links. Only admins should see those links and do those operations. How can I do that? Thanks.

    ASP.NET question csharp asp-net security announcement

  • EF Code-First to Existing Database
    J jasonalien

    Hello all, I have applied EF Code-First to Existing Database like this : 1- Created an ADO.NET Entity Data Model 2- Chose Code First from Database All of the classes generated correctly, except there are a lot of [Key] tags before most of the properties. Should I remove them from unnecessary ones? Another question is, how can I be sure that EF kept the one-to-many or many-to-many relationships? There is nothing like :

    public virtual ICollection Posts { get; set; }

    Thanks in advance.

    C# question csharp database

  • Converting an URL to JSON encoded format
    J jasonalien

    Thank you

    JavaScript javascript com json help question

  • Converting an URL to JSON encoded format
    J jasonalien

    Hello there, I want to have a function that turns this : http://examplesite.com/folders/images/myphoto.jpg to this : http:\/\/examplesite.com\/folders\/images\/myphoto.jpg Can any of you help me with that? I'm not that good at JS but I need this : / Thanks.

    JavaScript javascript com json help question

  • 'System.Windows.Controls.Image' does not contain a definition for 'FromFile'
    J jasonalien

    Thank you for your reply, I did what you said and I get this : The type or namespace name 'Image' does not exist in the namespace 'System.Drawing' (are you missing an assembly reference?) Thanks.

    C# csharp question wpf graphics help

  • File Upload Using Query String in PHP
    J jasonalien

    Thank you very much..

    Web Development database php com sysadmin tools

  • 'System.Windows.Controls.Image' does not contain a definition for 'FromFile'
    J jasonalien

    Hello, I have this C# code but I get the error in the title. on the "FromFile" part. I want to simply publish images in my PC on a WPF application. How can I get rid of this error? Thanks. Code :

    using System.Drawing;

    namespace Photo
    {
    public partial class MainWindow : Window
    {
    public MainWindow()
    {
    InitializeComponent();

            string filename1 = @"C:\\images\\mainicon.jpg";
            Image image1 = Image.FromFile(filename1);
        }
    }
    

    }

    Error : 'System.Windows.Controls.Image' does not contain a definition for 'FromFile'

    C# csharp question wpf graphics help

  • File Upload Using Query String in PHP
    J jasonalien

    Thanks for your reply.. The files will certainly exist, I know that otherwise the script will be meaningless. I know how to upload using a form but I want to do it automatically using query string.

    Web Development database php com sysadmin tools

  • File Upload Using Query String in PHP
    J jasonalien

    Hello, I want to have such a specific PHP script, which I will use only for a special purpose, not for hacking or anything bad or illegal.. For example I have "photo1.jpg" and "photo2.jpg" files on my desktop. If I somehow, pass the names of these files in query string like www.mywebsite.com/index.php?pic1=photo1.jpg&photo2.jpg Could I upload these photos to my server automatically? Is there such a way in PHP? If so please explain to me a little.. I want this script because my webpage needs to upload certain pictures from PC and show them to user.. Any help is appreciated.. Thanks..

    Web Development database php com sysadmin tools
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups