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
M

mrkeivan

@mrkeivan
About
Posts
183
Topics
104
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Api post call works on postman but in mobile app or ajax call it doesn't
    M mrkeivan

    you are right, i found out a line I left in the global.cs :^) :^) :^) :^) thanx man, appreciate it.

    ASP.NET help json csharp asp-net mobile

  • Api post call works on postman but in mobile app or ajax call it doesn't
    M mrkeivan

    this is what I get Request Accept:*/* Accept-Encoding:gzip, deflate, sdch Accept-Language:en-US,en;q=0.8 Access-Control-Request-Headers:cache-control Access-Control-Request-Method:POST Cache-Control:no-cache Connection:keep-alive Host:api.novin.solutions Origin:http://localhost:1344 Pragma:no-cache Referer:http://localhost:1344/Home/Index User-Agent:Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Response Access-Control-Allow-Credentials:true Access-Control-Allow-Headers:content-Type, accept, origin, X-Requested-With, Authorization, name Access-Control-Allow-Methods:POST, PUT, DELETE, GET, OPTIONS Access-Control-Allow-Origin:* Connection:close Content-Length:1245 Content-Type:text/html Date:Fri, 10 Mar 2017 05:26:20 GMT Server:Microsoft-IIS/8.5 Vary:Accept-Encoding X-Powered-By:ASP.NET X-Powered-By-Plesk:PleskWin

    ASP.NET help json csharp asp-net mobile

  • Api post call works on postman but in mobile app or ajax call it doesn't
    M mrkeivan

    :)))) don't worry it's a sample ! :laugh:

    ASP.NET help json csharp asp-net mobile

  • Api post call works on postman but in mobile app or ajax call it doesn't
    M mrkeivan

    How do you make this call ???

    ASP.NET help json csharp asp-net mobile

  • Api post call works on postman but in mobile app or ajax call it doesn't
    M mrkeivan

    Hi, thanx for the response removed them, now I only have it in - web.config and - config.EnableCors(); in WebApiConfig

    ASP.NET help json csharp asp-net mobile

  • Api post call works on postman but in mobile app or ajax call it doesn't
    M mrkeivan

    here's the problem I've got an API with the following address (HTTP post)

    http://api.novin.solutions/api/member/login
    "headers": {
    "accept": "application/json",
    "content-type": "application/x-www-form-urlencoded"
    },

      "data": {
        "username": "mrkeivan",
        "password": "09126101185",
        "uiId": "d960a994-0972-44ba-ae2c-2c3a01e135c1"
      }
    

    I need to call this api in another website and a mobile application, to do so I enabled Asp.net APi Cores globally in web config and WebApiConfig.cs **in WebApiConfig.cs** config.EnableCors(new EnableCorsAttribute("*", "*", "*")); > as well as Web.config

    when I call this in postman, it works perfectly however when I call it through an ajax method or a friend of mine calls it in his mobile app project it returns the following error > XMLHttpRequest cannot load > http://api.novin.solutions/api/member/login. Response for preflight > has invalid HTTP status code 404 OPTIONS > http://api.novin.solutions/api/member/login 404 (Not Found) I have read many articles in this matter and applied all the suggestions, but nothing fixed my problem :( any help would be appreciated

    ASP.NET help json csharp asp-net mobile

  • MVC Standard coding
    M mrkeivan

    I'm kind of new to MVC (been programming for about 6 months), I'm looking for some help trying to learn standard coding in mvc, I already have my model and classes separate in another project but what I'm looking for is things like exception handling, standard view messages for example I have a class called returnMessage and through this I send anything I want back to my view (in ViewBag) and display it there, so if you could guide me thought or give me some articles to read that would be fantastic. Regards, Mr.K

    ASP.NET tutorial asp-net architecture help

  • Show list of data in table with set time out
    M mrkeivan

    Hey guys, I know the title is simple but I'm new to javascript and would appreciate if you could help me out here's the deal, I ve got some records that i read from database, and I want to add the to top of my table this is run every 20 seconds

    var interval = setInterval(function () {
    loadTableData(selectedOption);
    }, 20000);

    here's what's happening inside loadTableData function

    function loadTableData(dataType) {
    $.get("/JsonResultlink", null, function (result) {
    var itemAdd;
    $.each(result, function (i, item) {
    loadRecordTimeOut = setTimeout(function () {
    if (result[i].VEHICLEPLATE !== undefined) {
    // build the html code
    itemToAdd = generateRow(result[i], dataType);
    // add to table body
    $('.tto-violation-tablebody').prepend(itemToAdd);
    // if rows exceed 50 remove from bottom
    checkRowCount();
    }
    }, 1000 * i);
    });
    clearTimeout(loadRecordTimeOut);
    });
    }

    loadTableData is called in document ready and then every 2 seconds Now I got 3 buttons that when each is clicked i call loadTableData with new dataType and show the result now the problem is that in the middle of data being added to table i click one button I want the table to clear and the new data be displayed but what i get is that data loading becomes faster and i get both data from previous load and this load, Please help me out and I'd like to learn clean coding so if you have any suggestions please let me know, appreciate it.

    JavaScript help javascript html database

  • best free Treeview
    M mrkeivan

    Hi guys, I'm looking for suggestions, I'm trying to find a tree view which allows me to use both client and server side coding on it and it's free :D I know the good ones are not free and they shouldn't but i figured someone might have come across one ;-) thanx alot

    ASP.NET sysadmin data-structures

  • plan and execute an android project
    M mrkeivan

    Hi guys, I'm new in android programming and I want to start this on the right path. my current employer is working on a huge project (web/mobile) and was't me to start working on android version. I have studied it before know how it works, I'm looking for a guide, on how to develope it right, anything from naming folders to code structure. do we have such a thing ? thanx alot K1

    Android tutorial android question announcement

  • Classes and List of classes
    M mrkeivan

    Hey guys, I'm learning c++ and I've got a question, I have a class called <> and I want to store a list of the objects in another class called <> How can I do it properly? Thanx

    C / C++ / MFC question c++ learning

  • Creating a static Map
    M mrkeivan

    Hi guys, I have a static map (image) and I want to Have some items on it (div) showing a red dot, and on each red dot I show some details fetching by a JavaScript function from my database. another problem is when I zoom the page I want the red dots to stay where they are. This Map has one level zoom. Please Help me out or if you know of any tutorial please let me know Thanxxxx

    Web Development help javascript database tutorial

  • Creating a static Map
    M mrkeivan

    Hi guys, I have a static map (image) and I want to Have some items on it (div) showing a red dot, and on each red dot I show some details fetching by a JavaScript function from my database. This Map has one level zoom. Please Help me out or if you know of any tutorial please let me know Thanxxxx

    JavaScript javascript database help tutorial

  • command implement loop
    M mrkeivan

    Thanx. ;-)

    Database database oracle help tutorial

  • command implement loop
    M mrkeivan

    If i'm not mistaken this works when I want to get the maximum number, but here I want to see for example what is the maximum passed number of cars in every 60 minutes.

    Database database oracle help tutorial

  • command implement loop
    M mrkeivan

    Hey guys I have two tables 1- Holds the cars passed (CarId, DeviceId, PassDate) 2- Holds the List of Cameras capturing each car (DeviceID, DeviceName) I want to check on a specific Date the maximum number of car passed in period(every 60 minutes, 2 hours …) So I have to use a double loop the first for each device and the second for the period.

    For(everydevice)
    {
    For(every period in the time)
    }

    The should look like this List

    Device Name --------- Max Passed Cars

    Since I’m new to oracle SQL Programming I dunno how to implement this, I appreciate it if you can help me out

    Database database oracle help tutorial

  • Optimizing a query
    M mrkeivan

    Hi, please help me optimize this query

    SELECT DISTINCT CC_STRINGENTEREXIT(ems.passdatetime,
    (Select emsqi.PLATENUMBER from EMSQUIRKINFO emsqi
    where emsqi.emsinfoid = ems.emsinfoid)
    ) as DetailEnterExit,
    CC_DURATIONENTEREXIT(
    (Select emsqi.PLATENUMBER from EMSQUIRKINFO emsqi
    where emsqi.emsinfoid = ems.emsinfoid)
    , ems.passdatetime) as DurationInZone
    FROM EMSINFO ems
    where
    trunc(ems.passdatetime) = trunc(to_date('26-DEC-13 11.46.56', 'DD-Mon-YY HH24:MI:SS')) AND
    CC_GETNEXTENTER(ems.EMSINFOID,
    (Select emsqi.PLATENUMBER from EMSQUIRKINFO emsqi
    where emsqi.emsinfoid = ems.emsinfoid)
    , ems.PASSDATETIME) <> 0 and
    CC_CheckForExit(ems.PASSDATETIME,
    (
    select ems2.PASSDATETIME from EMSINFO ems2
    where ems2.EMSINFOID = CC_GETNEXTENTER(ems.EMSINFOID,
    (Select emsqi.PLATENUMBER from EMSQUIRKINFO emsqi
    where emsqi.emsinfoid = ems.emsinfoid)
    , ems.PASSDATETIME)
    ),
    (Select emsqi.PLATENUMBER from EMSQUIRKINFO emsqi
    where emsqi.emsinfoid = ems.emsinfoid)
    ) <> 0
    and ems.masterplatenumber = '150444833' and rownum <100 ;

    you see that 1-

    Select emsqi.PLATENUMBER from EMSQUIRKINFO emsqi
    where emsqi.emsinfoid = ems.emsinfoid

    has been repeated multiple time, how do I declare it once and use it as many times as I want. 2-

    CC_GETNEXTENTER()

    has also been repeated, and in the functions I have a similar Issue, how can I get the value of the function once and use it as many times as I want through the query? Thanx in advance

    Database question help database code-review

  • Processing records in select statement in Oracle DB
    M mrkeivan

    Thanx, your comments are really helpful, I have another question I have to use to functions, both return either zero or ID function1- Finds the Next enter after a particular enter function2- Checks if there is an exit between these two in my query multiple times and I want to see how I can declare a variable to hold them I wanna say

    SELECT platenumber
    ,EnterDATE
    ,EnterRoad entryroad
    ,ExitDate exitroad: // select date from table where id = return value of function2
    ,ExitRoad exittime // select road from table join ... where id = return value of function2

    and also in 2, 3 other places, How can I declare a Variable so I dont need to use it over and over again? Regards, K1

    Database help database oracle

  • Processing records in select statement in Oracle DB
    M mrkeivan

    Hi guys I have a table with list of records or cards passing a place ID: int CarPlate: int PassDate: date PassType: byte > 1 enter, 2 exit I want to select the total amount of time each car has been in that place by date now this is my strategy but I cant implement it :( Imaging in a particular date a cards enters and exits are as followed: 1- enter > 2- enter > 3- < exit 4- enter > 5- < exit This particular car has entered 3 times and exited two times, I only want the enter and exit that are back to back so I need to select all the enters for all card in a particular date and then for every enter check whether there is a exit before the next enter or not and continue this to the end for each plate and then the next plate. I have problem implementing this process of going through plates and at the end for my end result should be something like this CarPlate | Date | EnterExit | Duration This EnterExit is a string of collections of enters and exits enter at ..... exit at ..... enter at ..... exit at ..... enter at ..... exit at ..... enter at ..... exit at ..... . . . Please help me out :)

    Database help database oracle

  • Query in SQL Server or Oracles
    M mrkeivan

    Thanx, I will check it out

    Database database sql-server oracle sysadmin help
  • Login

  • Don't have an account? Register

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