Lv 44977 points

betty a

Respuestas favoritas10%
Respuestas1526
  • Windows velocity App-fabric azure?

    Hello!!!

    I've been learning about Microsoft project code name velocity and now it seems the name is appfabric azure, I need to be schooled to understand are they related?, the name changed? or whats the deal.

    Thanks a lot

    1 respuestaSoftwarehace 10 años
  • References Visual Studio 2010?

    I'm Checking this code trying to learn about Velocity:

    namespace VelocityClientConsole

    {

    class Program

    {

    static void Main(string[] args)

    {

    // Create the cache factory

    CacheFactory factory = new CacheFactory();

    // Get the default named cache

    Cache cache = factory.GetCache("default");

    // Add a string to the cache

    cache.Put("MyCacheKey", "Hello World");

    // Get the data from the cache

    string s = (string)cache.Get("MyCacheKey");

    Console.WriteLine(s);

    Console.ReadLine();

    }

    }

    }

    It shows an error on CacheFactory, the type or namesapce name 'CacheFactory' could not be found. (are you missing a using directive?).

    I found that CacheFactory Class needs:

    Namespace: System.Data.Caching

    Assembly: ClientLibrary (in clientlibrary.dll)

    Added them and still the error plus an error on System.Data.Caching.

    Any ideas?, Please keep in mind I'm new to visual studio and velocity.

    Thanks

    2 respuestasProgramming & Designhace 10 años
  • New in Visual studio?

    Where can I find samples of code?

    I basically need to learn how to Get, Add and Remove

    I need to change this code to work with velocity.....

    public static object Get(string key)

    {

    if (HttpRuntime.Cache == null || string.IsNullOrEmpty(key))

    return null;

    return HttpRuntime.Cache[key];

    }

    Any ideas?

    2 respuestasProgramming & Designhace 10 años
  • Heeeelp New in Visual studio?

    I'm just starting with visual studio, know nothing about it, need to work with velocity and found a tutorial on channel9; however I have a .cs file and I have no idea what to do, I mean the tutorial opens .aspx and .config and i suppose to modify a .cs; any idea where should i start from?

    I am really lost.

    Thanks a lot

    2 respuestasProgramming & Designhace 10 años
  • SQL Cursors- HEEEEEEEEEEEEEEELP?

    Northwind management wants to encourage low-producing salespeople by transferring to them some purchase orders from top producers. A colleague of yours was asked to transfer one purchase order from employees that had open orders (orders not yet shipped) totaling two or more above average to employees having two or more below average.

    Your task is to rewrite your colleague script without using Cursors.

    This is the script:

    -- This SELECT query shows the initial state.

    -- It shows all employees with their order count.

    -- We will run this query at the end and visually compare the two result sets.

    USE NORTHWIND

    GO

    SELECT 'INITIAL STATE' [INITIAL STATE], e.employeeID,

    count(*) [CNT] from employees e JOIN orders et on et.employeeid = e.employeeid

    WHERE shippedDate IS NULL

    GROUP BY e.employeeID

    ORDER BY COUNT(*)

    -- ^^^^

    DECLARE @AverageOrderCount INT, @TopProducerID INT, @LowProducerID INT, @CNT INT

    SELECT @AverageOrderCount = AVG(cnt)

    FROM (

    SELECT e.employeeID, count(*) [cnt] FROM EMPLOYEES e JOIN ORDERS et ON et.employeeid = e.employeeid

    WHERE shippedDate is null

    GROUP BY e.employeeID

    ) X

    PRINT 'AVG Order Count ' + CAST(@AverageOrderCount AS VARCHAR(10))

    DECLARE TopProducers INSENSITIVE CURSOR FOR

    SELECT E.EmployeeID, COUNT(*) [cnt]

    FROM EMPLOYEES E

    JOIN ORDERS ET ON ET.employeeid = E.employeeid

    WHERE ShippedDate IS NULL

    GROUP BY E.employeeID

    HAVING COUNT(*) > @AverageOrderCount + 1

    ORDER BY COUNT(*) DESC

    DECLARE @LowProducerOrderID INT, @HighProducerOrderID INT

    DECLARE LowProducers CURSOR FOR

    SELECT E.EmployeeID, COUNT(*) [cnt]

    FROM EMPLOYEES E

    JOIN ORDERS ET ON ET.employeeid = E.employeeid

    WHERE ShippedDate IS NULL

    GROUP BY E.employeeID

    HAVING COUNT(*) < @AverageOrderCount - 1

    OPEN TopProducers

    OPEN LowProducers

    FETCH NEXT FROM TopProducers INTO @TopProducerID, @CNT

    BEGIN TRAN

    WHILE @@FETCH_STATUS = 0

    BEGIN

    PRINT 'TopProducerID ' + CAST(@TopProducerID AS varchar(10)) + ', CNT ' + CAST(@CNT AS varchar(10))

    FETCH NEXT FROM LowProducers INTO @LowProducerID, @CNT

    IF @@FETCH_STATUS = 0

    BEGIN

    PRINT 'LowProducerID ' + CAST(@LowProducerID AS varchar(10)) + ', CNT ' + CAST(@CNT AS varchar(10))

    UPDATE Orders

    SET EmployeeID = @LowProducerID

    WHERE OrderID = ( SELECT TOP 1 OrderID

    FROM Orders

    WHERE EmployeeID = @TopProducerID AND ShippedDate IS NULL)

    END

    FETCH NEXT FROM TopProducers INTO @TopProducerID, @CNT

    END

    CLOSE TopProducers

    DEALLOCATE TopProducers

    CLOSE LowProducers

    DEALLOCATE LowProducers

    -- This SELECT query shows the end state. Visually compare it with the initial query

    SELECT 'END STATE' [END STATE], e.employeeID, count(*) [CNT] from employees e JOIN orders et on et.employeeid = e.employeeid

    WHERE shippedDate IS NULL

    GROUP BY e.employeeID

    ORDER BY COUNT(*)

    -- ^^^^

    --ROLLBACK! If you Commit, then you will not be able to compare the No Cursor query

    -- against the Cursor query

    ROLLBACK

    So far I have:

    USE NORTHWIND

    GO

    SELECT 'INITIAL STATE' [INITIAL STATE], e.employeeID,

    count(*) [CNT] from employees e JOIN orders et on et.employeeid = e.employeeid

    WHERE shippedDate IS NULL

    GROUP BY e.employeeID

    ORDER BY COUNT(*)

     ^^^^

    Generates:

    INITIAL STATE employeeID CNT

    1 INITIAL STATE 9 1

    2 INITIAL STATE 6 2

    3 INITIAL STATE 7 3

    4 INITIAL STATE 1 3

    5 INITIAL STATE 2 3

    6 INITIAL STATE 8 4

    7 INITIAL STATE 4 5

    I have to find the way to:

    INITIAL STATE employeeID CNT

    1 INITIAL STATE 9 1+1

    2 INITIAL STATE 6 2+1

    3 INITIAL STATE 7 3

    4 INITIAL STATE 1 3

    5 INITIAL STATE 2 3

    6 INITIAL STATE 8 4-1

    7 INITIAL STATE 4 5-1

    To obtain:

    END STATE employeeID CNT

    1 END STATE 9 2

    2 END STATE 6 2

    3 END STATE 7 3

    4 END STATE 1 3

    5 END STATE 2 3

    6 END STATE 8 4

    7 END STATE 4 4

    So I have to use a Memory Table:

    DECLARE @Temp TABLE (IDT INT IDENTITY(1,1),

    HighProducerEmployeeID INT,

    HighProducerCNT INT,

    HighProducerOrderID INT,

    LowProducerEmployeeID INT,

    LowProducerCNT INT)

    This procedure will find all the sales that haven’t been closed order by employeeID:

    DECLARE @AverageOrderCount INT

    SELECT @AverageOrderCount = AVG(cnt)

    FROM ( SELECT e.employeeID, count(*) [cnt]

    FROM EMPLOYEES e JOIN ORDERS et ON et.employeeid = e.employeeid

    WHERE shippedDate is null

    GROUP BY e.employeeID ) X

    Which is the same:

    INITIAL STATE employeeID CNT

    1 INITIAL STATE 9 1

    2 INITIAL STATE 6 2

    3 INITIAL STATE 7 3

    4 INITIAL STATE 1 3

    5 INITIAL STATE 2 3

    6 INITIAL STATE 8 4

    7 INITIAL STATE 4 5

    Now I should be able to insert that info into the Temp table:

    And then I'm lost.

    Please Heeeeeeelp

    Than

    2 respuestasProgramming & Designhace 1 década
  • SQL Northwind Help! I don't know what to do?

    I have to rewrite a code made originally with cursors, the idea is to transfer some purchase orders from top producers average to employees having two or more below average. So far I have:

    USE NORTHWIND

    GO

    SELECT 'INITIAL STATE' [INITIAL STATE], e.employeeID,

    count(*) [CNT] from employees e JOIN orders et on et.employeeid = e.employeeid

    WHERE shippedDate IS NULL

    GROUP BY e.employeeID

    ORDER BY COUNT(*)

    -- ^^^^

    DECLARE @AverageOrderCount INT, @TopProducerID INT, @LowProducerID INT, @CNT INT

    SELECT @AverageOrderCount = AVG(cnt)

    FROM (

    SELECT e.employeeID, count(*) [cnt] FROM EMPLOYEES e JOIN ORDERS et

    ON et.employeeid = e.employeeid

    WHERE shippedDate is null

    GROUP BY e.employeeID

    ) X

    SELECT 'END STATE' [END STATE], e.employeeID,

    count(*) [CNT] from employees e JOIN orders et on et.employeeid = e.employeeid

    WHERE shippedDate IS NULL

    GROUP BY e.employeeID

    ORDER BY COUNT(*)

    PRINT 'AVG Order Count ' + CAST(@AverageOrderCount AS VARCHAR(10))

    -- ^^^^

    And it produces:

    employeeID - CNT

    9 - 1

    6 - 2

    7 - 3

    1 - 3

    2 - 3

    8 - 4

    4 - 5

    I have to transfer them, to have

    employeeID - CNT

    6 - 2

    9 - 2

    7 - 3

    1 - 3

    2 - 3

    4 - 4

    8 - 4

    And I have no idea what to do or how?

    Thanks a lot

    1 respuestaProgramming & Designhace 1 década
  • ¿Como se supera una traicion?

    Cuand se ha ayudado a una supuesta "amiga" y esta te paga clavandote el cuchillo por la espalda tantas veces q ya ni se pueden contar.

    Como parar el deseo de venganza q carcome?

    4 respuestasAmigoshace 1 década
  • SQL I need to alter a to add a constrain in order to reject any PercentageCommission greater than 4%.?

    All i find about percentage is the use of the '%' which is not what i need. Any ideas? Thanks

    1 respuestaProgramming & Designhace 1 década
  • I can't find the option: allow indexing services to index this disk?

    I have windows XP, and when i go to MyComputer/properties I don't have the option "Allow Indexing Service to index this disk for fast file searching", What can I do?

    Thanks

    2 respuestasProgramming & Designhace 1 década
  • I need to find info about "Indefinite Verification of Prompt Input" in HTML?

    Any Ideas where can I find it???

    Thanks.

    1 respuestaProgramming & Designhace 1 década
  • ¿Sera que es posible que Ecuador pida en extradicion a Luis Alfredo Garavito?

    Violador y asesino de al menos 140 ni#os, entre ellos muchos ni#os ecuatorianos, porq parece ser que ya pronto va a salir de la carcel en Colombia.

    2 respuestasLeyes y Éticahace 1 década
  • ¿Como se hallan los puntos x graficar?

    f(x)=2z-y+2x-5

    1 respuestaMatemáticashace 1 década
  • problem with the equation?

    I need to know why the equation is 2y-x >=0???

    . a. Define the model (set of equations)

    b. What is the maximum profit and the number of sodas and hotdogs ?. (Use a graphical solution ).

    A man operates a pushcart. He sells hotdogs and sodas. His cart can support 210 lbs. A hotdog weighs 2 ounces, a soda weighs 8 ounces. He knows from experience that he must have at least 60 sodas and 80 hotdogs. He also knows that for every two hotdogs he sells, he needs at least one soda. Given he makes 8 Cents profit on a hotdog and 4 cents on a soda, find how many sodas and hotdogs he must have in order to maximize profits.

    Maximize z = 0.8x + 0.4 y subject to

    0.125x + 0.5y <= 210

    1x >= 80

    1y >= 60

    -x + 2y >= 0 why this???????????????

    if He also knows that for every two hotdogs he sells, he needs at least one soda, it should be 2x >=y

    Thanks a lot

    1 respuestaMathematicshace 1 década
  • I need to know if the equations are OK?

    2. An small company produces two types of paints A and B. What is the maximum profit and the amount of paint A and B in gallons to be produced per week.?

    a. Profit for paint A = US$ 6.00 / hundred gallons,

    B = US$ 8.00/ hundred gallons.

    b. Production standards :

    paint A requires 4 units of raw materials / 100 gallons

    paint B requires 1 unit of raw materials / 100 gallons

    paint A requires 1 hr labor / 100 gallons

    paint B requires 4 hr labor / 100 gallons

    c. There are 20 units of raw material available and 40 hrs/week of labor.

    Note: use the simplex method.

    3. a. Define the model (set of equations)

    z = 0,6A + 0.8B

    4A + 1B <=20

    1A + 4B <=40

    A>=0, B>=0

    1 respuestaMathematicshace 1 década
  • I need to find this definitions?

    -Define the elements of the transport protocols:

    -Connection Release

    -Flow Control and Buffering

    -Explain the service primitives for the simple transport protocol:

    - Listen

    -Connect

    -Send

    -Receive

    -Disconnect

    1 respuestaComputer Networkinghace 1 década
  • where could i find these definitions :?

    -Connection Release

    -Flow Control and Buffering

    -Crash Recovery

    2 respuestasComputer Networkinghace 1 década
  • where could i find these definitions :?

    -Connection Release

    -Flow Control and Buffering

    -Crash Recovery

    1 respuestaComputer Networkinghace 1 década