static void Main(string[] args) { Console.WriteLine("Notu gir "); not a = (not)Convert.ToByte(Console.ReadLine());// not a = (not)1; 1inci indexteki değeri alır Console.WriteLine(a); byte c = (byte)a; Console.WriteLine(c.GetType()); Console.ReadKey(); }
public override void Sil(object obj) { not notu = (not)obj; Baglan(); komut = new SqlCommand("notSil", baglanti); komut.CommandType = CommandType.StoredProcedure; komut.Parameters.AddWithValue("@O_id", notu.O_id); komut.ExecuteNonQuery(); baglanti.Close(); baglanti.Dispose(); }
public override DataTable Listele(object obj) { not notu = (not)obj; Baglan(); string sorgu = "select o.Adi,d.Adi,n.notu from tbl_not n, tbl_dersler d, tbl_ogrenci o where n.D_id=d.id and n.o_id=o.id and o.id=" + notu.O_id; komut = new SqlCommand(sorgu, baglanti); komut.CommandType = CommandType.Text; komut.ExecuteNonQuery(); adaptor = new SqlDataAdapter(komut); tablo = new DataTable(); adaptor.Fill(tablo); baglanti.Close(); baglanti.Dispose(); return(tablo); }
public void TestMethod14() { // testing not RegisterFile <Vector4> vRF = new RegisterFile <Vector4>(32); RegisterFile <Scalar> sRF = new RegisterFile <Scalar>(32); Memory m = new Memory(5000); Memory m_ic = new Memory(5000); IntersectionCore ic = new IntersectionCore(m_ic); sRF[1] = 10; not n = new not(0, 1); n.Process(vRF, sRF, m, ic); Assert.AreEqual <int>(-11, sRF[0].i); }
/// Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. The field_name is the name of the field you want to compare.Only atomic field types are supported(string, number, boolean).The comparison_string must be either eq(equals) or ne(not equals).The literal_string is the string value to filter to.The literal value must be valid for the type of field you are filtering by(string, number, boolean).For string fields, the literal value is interpreted as a regular expression using RE2 syntax.The literal value must match the entire field.
public void TestMethod33() { // ToString test and and = new and(1, 2, 3); Assert.AreEqual("and r1 r2 r3", and.ToString()); bne bne = new bne(1); Assert.AreEqual("bne 1", bne.ToString()); bg bg = new bg(1); Assert.AreEqual("bg 1", bg.ToString()); bl bl = new bl(1); Assert.AreEqual("bl 1", bl.ToString()); bge_rt bge_rt = new bge_rt(1); Assert.AreEqual("bge_rt 1", bge_rt.ToString()); ble_rt ble_rt = new ble_rt(1); Assert.AreEqual("ble_rt 1", ble_rt.ToString()); cmp_i cmpi = new cmp_i(1, 2); Assert.AreEqual("cmp_i r1 r2", cmpi.ToString()); cmp_f cmpf = new cmp_f(1, 2); Assert.AreEqual("cmp_f r1 r2", cmpf.ToString()); cmp_v cmpv = new cmp_v(1, 2); Assert.AreEqual("cmp_v r1 r2", cmpv.ToString()); ff_add ff_add = new ff_add(1, 2, 3); Assert.AreEqual("ff_add r1 r2 r3", ff_add.ToString()); ff_sub ff_sub = new ff_sub(1, 2, 3); Assert.AreEqual("ff_sub r1 r2 r3", ff_sub.ToString()); ff_mul ff_mul = new ff_mul(1, 2, 3); Assert.AreEqual("ff_mul r1 r2 r3", ff_mul.ToString()); ff_div ff_div = new ff_div(1, 2, 3); Assert.AreEqual("ff_div r1 r2 r3", ff_div.ToString()); fin fin = new fin(); Assert.AreEqual("fin", fin.ToString()); ftoi ftoi = new ftoi(1, 2); Assert.AreEqual("ftoi r1 r2", ftoi.ToString()); ii_add ii_add = new ii_add(1, 2, 3); Assert.AreEqual("ii_add r1 r2 r3", ii_add.ToString()); ii_addi ii_addi = new ii_addi(1, 2, 3); Assert.AreEqual("ii_addi r1 r2 3", ii_addi.ToString()); ii_sub ii_sub = new ii_sub(1, 2, 3); Assert.AreEqual("ii_sub r1 r2 r3", ii_sub.ToString()); ii_subi ii_subi = new ii_subi(1, 2, 3); Assert.AreEqual("ii_subi r1 r2 3", ii_subi.ToString()); ii_mul ii_mul = new ii_mul(1, 2, 3); Assert.AreEqual("ii_mul r1 r2 r3", ii_mul.ToString()); ii_muli ii_muli = new ii_muli(1, 2, 3); Assert.AreEqual("ii_muli r1 r2 3", ii_muli.ToString()); ii_div ii_div = new ii_div(1, 2, 3); Assert.AreEqual("ii_div r1 r2 r3", ii_div.ToString()); ii_divi ii_divi = new ii_divi(1, 2, 3); Assert.AreEqual("ii_divi r1 r2 3", ii_divi.ToString()); itof itof = new itof(1, 2); Assert.AreEqual("itof r1 r2", itof.ToString()); real_jmp real_jmp = new real_jmp(1); Assert.AreEqual("real_jmp 1", real_jmp.ToString()); jmp_link jmp_link = new jmp_link(1); Assert.AreEqual("jmp_link 1", jmp_link.ToString()); not not = new not(1, 2); Assert.AreEqual("not r1 r2", not.ToString()); or or = new or(1, 2, 3); Assert.AreEqual("or r1 r2 r3", or.ToString()); ret ret = new ret(); Assert.AreEqual("ret", ret.ToString()); s_get_from_v sgfv = new s_get_from_v(1, 2, 3); Assert.AreEqual("s_get_from_v r1 r2 3", sgfv.ToString()); s_load_4byte sl4b = new s_load_4byte(1, 2, 3); Assert.AreEqual("s_load_4byte r1 r2 3", sl4b.ToString()); s_store_4byte ss4b = new s_store_4byte(1, 2, 3); Assert.AreEqual("s_store_4byte r1 r2 3", ss4b.ToString()); s_write_high swh = new s_write_high(1, 5); Assert.AreEqual("s_write_high r1 5", swh.ToString()); s_write_low swl = new s_write_low(1, 5); Assert.AreEqual("s_write_low r1 5", swl.ToString()); s_push s_push = new s_push(1); Assert.AreEqual("s_push r1", s_push.ToString()); s_pop s_pop = new s_pop(1); Assert.AreEqual("s_pop r1", s_pop.ToString()); v_push v_push = new v_push(1); Assert.AreEqual("v_push r1", v_push.ToString()); v_pop v_pop = new v_pop(1); Assert.AreEqual("v_pop r1", v_pop.ToString()); v_get_from_s vgfs = new v_get_from_s(1, 2, 3); Assert.AreEqual("v_get_from_s r1 r2 3", vgfs.ToString()); v_load_16byte vl16 = new v_load_16byte(1, 2, 3); Assert.AreEqual("v_load_16byte r1 r2 3", vl16.ToString()); v_magn v_magn = new v_magn(1, 2); Assert.AreEqual("v_magn r1 r2", v_magn.ToString()); v_store_16byte vs16 = new v_store_16byte(1, 2, 3); Assert.AreEqual("v_store_16byte r1 r2 3", vs16.ToString()); vf_add vf_add = new vf_add(1, 2, 3); Assert.AreEqual("vf_add r1 r2 r3", vf_add.ToString()); vf_sub vf_sub = new vf_sub(1, 2, 3); Assert.AreEqual("vf_sub r1 r2 r3", vf_sub.ToString()); vf_mul vf_mul = new vf_mul(1, 2, 3); Assert.AreEqual("vf_mul r1 r2 r3", vf_mul.ToString()); vf_div vf_div = new vf_div(1, 2, 3); Assert.AreEqual("vf_div r1 r2 r3", vf_div.ToString()); vi_add vi_add = new vi_add(1, 2, 3); Assert.AreEqual("vi_add r1 r2 r3", vi_add.ToString()); vi_sub vi_sub = new vi_sub(1, 2, 3); Assert.AreEqual("vi_sub r1 r2 r3", vi_sub.ToString()); vi_mul vi_mul = new vi_mul(1, 2, 3); Assert.AreEqual("vi_mul r1 r2 r3", vi_mul.ToString()); vi_div vi_div = new vi_div(1, 2, 3); Assert.AreEqual("vi_div r1 r2 r3", vi_div.ToString()); vv_add vv_add = new vv_add(1, 2, 3); Assert.AreEqual("vv_add r1 r2 r3", vv_add.ToString()); vv_sub vv_sub = new vv_sub(1, 2, 3); Assert.AreEqual("vv_sub r1 r2 r3", vv_sub.ToString()); vv_mul_ele vv_mul_ele = new vv_mul_ele(1, 2, 3); Assert.AreEqual("vv_mul_ele r1 r2 r3", vv_mul_ele.ToString()); vv_mul_dot vv_mul_dot = new vv_mul_dot(1, 2, 3); Assert.AreEqual("vv_mul_dot r1 r2 r3", vv_mul_dot.ToString()); vv_div vv_div = new vv_div(1, 2, 3); Assert.AreEqual("vv_div r1 r2 r3", vv_div.ToString()); xor xor = new xor(1, 2, 3); Assert.AreEqual("xor r1 r2 r3", xor.ToString()); }
Inf(not Set and not Matrix and var var, Interval(var left, var leftClosed, var right, var rightClosed)) =>
/// <summary> /// Updates the details of an EMM-managed user. Can be used with EMM - managed users only(not Google managed users).Pass the new details in the Users resource in the request body.Only the displayName field can be changed.Other fields must either be unset or have the currently active value.
When run with two arguments, the first must be a full package path (not just a
static void Main(string[] args) { Console.WriteLine(kod.Mon); not gg = new not(); gg.kk(); try { Candy cake = new Cake("Cake", 2500, 25, "Not yummy", 4); } catch (trycatch2 ex) { Console.WriteLine($"Ошибка,{ex.Message }"); } finally { Candy cake = new Cake("Cake", 2500, 25, " yummy", 4); cake.GetCandyInf(); Console.WriteLine("----------------------------------\n"); try { Candy sweets = new Sweets("sweet", 0, 2, " yummy", 1); } catch (DivideByZeroException) { Console.WriteLine("На ноль делим"); } finally { Candy sweets = new Sweets("sweet", 50, 2, " yummy", 1); sweets.GetCandyInf(); Console.WriteLine("----------------------------------\n"); Clock clock = new Clock("Rolex", "Clock", 100000, 2); clock.GetClockInf(); Console.WriteLine("----------------------------------\n"); Flowers flowers = new Flowers("Vasilki", "Flowers", 5, "blue", 3); flowers.GetClockInf(); Console.WriteLine("----------------------------------\n"); Goods[] List = new Goods[] { cake, sweets, clock, flowers }; Goods a = cake; Goods b = sweets; Goods c = flowers; Debug.Assert(false, "нельзя ничего вам"); for (int i = 0; i < 4; i++) { for (i = 0; i < 3; i++) { a = List[i]; if (List[i + 1] != null) { b = List[i + 1]; } if (a.Size > b.Size) { c = List[i]; List[i] = List[i + 1]; List[i + 1] = c; } } } present Kop = new present(); Kop.Add(cake); Kop.Add(clock); foreach (Goods cap in List) { print.printing(cap); Console.WriteLine(cap.Name); } } } }
private DataConnection?GetConnection(string provider, string?providerLocation, string connectionString, string?additionalConnectionString, out DataConnection?secondaryConnection) { secondaryConnection = null; var returnSecondary = false; // general rules: // - specify specific provider used by tool if linq2db supports multiple providers for database // - if multiple dialects (versions) of db supported - make sure version detection enabled // other considerations: // - generate error for databases with windows-only support (e.g. access, sqlce) // - allow user to specify provider discovery hints (e.g. provider path) for unmanaged providers switch (provider) { case ProviderName.SQLite: provider = ProviderName.SQLiteClassic; break; case ProviderName.SqlServer: SqlServerTools.AutoDetectProvider = true; SqlServerTools.Provider = SqlServerProvider.MicrosoftDataSqlClient; break; case ProviderName.Firebird: // TODO: don't forget to add versioning here after Firebird versioning feature merged break; case ProviderName.MySql: // TODO: remove provider hint after MySQL.Data support removed provider = ProviderName.MySqlConnector; break; case ProviderName.Oracle: OracleTools.AutoDetectProvider = true; provider = ProviderName.OracleManaged; break; case ProviderName.PostgreSQL: PostgreSQLTools.AutoDetectProvider = true; break; case ProviderName.Sybase: provider = ProviderName.SybaseManaged; break; case ProviderName.SqlCe: { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { Console.Error.WriteLine($"SQL Server Compact Edition not supported on non-Windows platforms"); return(null); } var assemblyPath = providerLocation ?? Path.Combine(Environment.GetEnvironmentVariable(IntPtr.Size == 4 ? "ProgramFiles(x86)" : "ProgramFiles") !, @"Microsoft SQL Server Compact Edition\v4.0\Private\System.Data.SqlServerCe.dll"); if (!File.Exists(assemblyPath)) { Console.Error.WriteLine(@$ "Cannot locate Server Compact Edition installation. Probed location: {assemblyPath}. Possible reasons: 1. SQL Server CE not installed => install SQL CE runtime (e.g. from here https://www.microsoft.com/en-us/download/details.aspx?id=30709) 2. SQL Server CE runtime architecture doesn't match process architecture => add '--architecture x86' or '--architecture x64' scaffold option 3. SQL Server CE runtime has custom location => specify path to System.Data.SqlServerCe.dll using '--provider-location <path_to_assembly>' option"); return(null); } var assembly = Assembly.LoadFrom(assemblyPath); DbProviderFactories.RegisterFactory("System.Data.SqlServerCe.4.0", assembly.GetType("System.Data.SqlServerCe.SqlCeProviderFactory") !); break; } case ProviderName.SapHana: { var isOdbc = connectionString.Contains("HDBODBC", StringComparison.OrdinalIgnoreCase); if (!isOdbc && !RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { Console.Error.WriteLine($"Only ODBC provider for SAP HANA supported on non-Windows platforms. Provided connection string doesn't look like HANA ODBC connection string."); return(null); } provider = isOdbc ? ProviderName.SapHanaOdbc : ProviderName.SapHanaNative; if (!isOdbc) { var assemblyPath = providerLocation ?? Path.Combine(Environment.GetEnvironmentVariable(IntPtr.Size == 4 ? "ProgramFiles(x86)" : "ProgramFiles") !, @"sap\hdbclient\dotnetcore\v2.1\Sap.Data.Hana.Core.v2.1.dll"); if (!File.Exists(assemblyPath)) { Console.Error.WriteLine(@$ "Cannot locate SAP HANA native client installation. Probed location: {assemblyPath}. Possible reasons: 1. HDB client not installed => install HDB client for .net core 2. HDB architecture doesn't match process architecture => add '--architecture x86' or '--architecture x64' scaffold option 3. HDB client installed at custom location => specify path to Sap.Data.Hana.Core.v2.1.dll using '--provider-location <path_to_assembly>' option"); return(null); } var assembly = Assembly.LoadFrom(assemblyPath); DbProviderFactories.RegisterFactory("Sap.Data.Hana", assembly.GetType("Sap.Data.Hana.HanaFactory") !); } break; } case ProviderName.Informix: case ProviderName.DB2: { if (provider == ProviderName.Informix) { provider = ProviderName.InformixDB2; } else { DB2Tools.AutoDetectProvider = true; } if (providerLocation == null || !File.Exists(providerLocation)) { // we cannot add 90 Megabytes (compressed size) of native provider for single db just because we can // note: we use IBM.Data.DB2.Core because Net.IBM.Data.Db2 and Net5.IBM.Data.Db2 require // net6/net5 runtime and fail to load if .net core 3.1 runtime used to run tool (default runtime for tool) Console.Error.WriteLine(@$ "Cannot locate IBM.Data.DB2.Core.dll provider assembly. Due to huge size of it, we don't include IBM.Data.DB2 provider into installation. You need to install it manually and specify provider path using '--provider-location <path_to_assembly>' option. Provider could be downloaded from: - for Windows: https://www.nuget.org/packages/Net.IBM.Data.DB2.Core - for Linux: https://www.nuget.org/packages/Net.IBM.Data.DB2.Core-lnx - for macOS: https://www.nuget.org/packages/Net.IBM.Data.DB2.Core-osx"); return(null); } var assembly = Assembly.LoadFrom(providerLocation); DbProviderFactories.RegisterFactory("IBM.Data.DB2", assembly.GetType($"{assembly.GetName().Name}.DB2Factory") !); break; } case ProviderName.Access: { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { Console.Error.WriteLine($"MS Access not supported on non-Windows platforms"); return(null); } var isOleDb = connectionString.Contains("Microsoft.Jet.OLEDB", StringComparison.OrdinalIgnoreCase) || connectionString.Contains("Microsoft.ACE.OLEDB", StringComparison.OrdinalIgnoreCase); if (!isOleDb) { provider = ProviderName.AccessOdbc; } if (additionalConnectionString == null) { Console.Out.WriteLine($"WARNING: it is recommended to use '--additional-connection <secondary_connection>' option with Access for better results"); } else { var isSecondaryOleDb = additionalConnectionString.Contains("Microsoft.Jet.OLEDB", StringComparison.OrdinalIgnoreCase) || additionalConnectionString.Contains("Microsoft.ACE.OLEDB", StringComparison.OrdinalIgnoreCase); if (isOleDb == isSecondaryOleDb) { Console.Error.WriteLine($"Main and secondary connection strings must use different providers. One should be OLE DB provider and another ODBC provider."); return(null); } var secondaryProvider = isSecondaryOleDb ? ProviderName.Access : ProviderName.AccessOdbc; var secondaryDataProvider = DataConnection.GetDataProvider(secondaryProvider, additionalConnectionString); if (secondaryDataProvider == null) { Console.Error.WriteLine($"Cannot create database provider '{provider}' for secondary connection"); return(null); } secondaryConnection = new DataConnection(secondaryDataProvider, additionalConnectionString); // to simplify things for caller (no need to detect connection type) // returned connection should be OLE DB and additional - ODBC returnSecondary = isSecondaryOleDb; } break; } default: Console.Error.WriteLine($"Unsupported database provider: {provider}"); return(null); } var dataProvider = DataConnection.GetDataProvider(provider, connectionString); if (dataProvider == null) { Console.Error.WriteLine($"Cannot create database provider: {provider}"); secondaryConnection?.Dispose(); return(null); } var dc = new DataConnection(dataProvider, connectionString); if (secondaryConnection != null && returnSecondary) { var tmp = secondaryConnection; secondaryConnection = dc; return(tmp); } return(dc); }
Inf(not Set and not Tensor and var var, Interval(var left, var leftClosed, var right, var rightClosed)) =>
static void Main(string[] args) { Console.WriteLine(kod.Mon); not gg = new not(); gg.kk(); Candy cake = new Cake("Cake", 2500, 25, "Not yummy", 4); cake.GetCandyInf(); Console.WriteLine("----------------------------------\n"); Candy sweets = new Sweets("sweet", 500, 2, " yummy", 1); sweets.GetCandyInf(); Console.WriteLine("----------------------------------\n"); Clock clock = new Clock("Rolex", "Clock", 100000, 2); clock.GetClockInf(); Console.WriteLine("----------------------------------\n"); Flowers flowers = new Flowers("Vasilki", "Flowers", 5, "blue", 3); flowers.GetClockInf(); Console.WriteLine("----------------------------------\n"); Goods [] List = new Goods[] { cake, sweets, clock, flowers }; int i; Goods a = cake; Goods b = sweets; Goods c = flowers; for (i = 0; i < 4; i++) { for (i = 0; i < 3; i++) { a = List[i]; if (List[i + 1] != null) { b = List[i + 1]; } if (a.Size > b.Size) { c = List[i]; List[i] = List[i + 1]; List[i + 1] = c; } } } present Kop = new present(); Kop.Add(cake); Kop.Add(clock); foreach (Goods cap in List) { print.printing(cap); Console.WriteLine(cap.Size); } }