اطلاعیه

کاربر گرامی

به انجمن برنامه نویسی AnswerCenter.ir خوش آمدید

 برای استفاده از تمامی امکانات سایت لطفا در انجمن عضو شوید


majid08

کاربر نیمه فعال
  • تعداد ارسال ها

    553
  • تاریخ عضویت

  • آخرین بازدید

اعتبار در سایت

249 عالی

3 دنبال کننده

درباره majid08

  • درجه
    کاربر رو به رشد

مشخصات پروفایل

  • محل تولد
    فارس

آخرین بازدید کنندگان نمایه

1,604 بازدید کننده نمایه
  1. سلام خسته نباشید بسیار عالی هست فقط اگر میشه یکاری کنید عکس که میاریم توی برنامه سایزش بهم نریزه یعنی کش نیاد ممنون میشم
  2. اموزش ساخت بازی امیرزا با بیسیک4اندروید

  3. سلام

    چنتا برنامه با کیفیت دارم

    نیاز به کسی دارم که بتونه برنامه ها رو بیاره بالا توی پوشه

    و 60 درصد درامد رو میتونه بگیره تا 6 ماه

    درامد از پوش هست

    TelegramID: http://T.me/Goodarzi1

    1. farshid-k

      farshid-k

      متوجه نشدم درست بیشتر توضیح میدین؟

    2. Negan

      Negan

      مجید جان منطقی نیست اینجور :oops: بیست تومن بریزیم رو اپ اونوقت 60 درصد برای شیش ماه ؟

      اگ اپ هارو میفروشین درخدمتم 

    3. majid08
  4. سلام اینو تست کنید $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; $isInProgram = $_POST['isInProgram']; if ($isInProgram == 'itIs') { $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "SELECT * FROM tbl WHERE name LIKE '%$_POST[text]%' "; $result = $conn->query($sql); if ($result->num_rows > 0) { echo "OK_OK"; }else { echo "NO_NO"; } }else { echo "Error 404: Web Page Not Found!"; } $conn->close();
  5. سلام این رو تست کنید $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; $isInProgram = $_POST['isInProgram']; if ($isInProgram == 'itIs') { $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = ""SELECT * FROM tbl WHERE name ='$isInProgram' "; $result = $conn->query($sql); if ($result->num_rows > 0) { echo "OK_OK"; }else { echo "NO_NO"; } }else { echo "Error 404: Web Page Not Found!"; } $conn->close();
  6. سلام این خط رو اینطور بنویسید $number1 = mysqli_query($con, "SELECT * FROM tbl WHERE name = '$_POST[text]' ");
  7. سلام این رو تست کنید احتمالا جواب میده Dim p As Phone dim Value as int = 20 If Value > 15 Then WriteSetting("screen_brightness", Value) p.SetScreenBrightness(Value/255) End If
  8. سلام این علامت مربوط میشه به استفاده از دستور Sleep اگر حذف کنید علامت میره
  9. سلام این مشکل شما از محدودیت php هست اگر سی پنل هست وارد پنل بشید => MultiPHP INI Editor بهد از قسمت Configure PHP INI basic settings همون اولا یه باکس هست home directory یا دامنه مورد نظر رو انتخاب کن بعد upload_max_filesize رو به اندازه ای که میخای ببر بالا بعدش applay تموم
  10. سلام ایا امکان دانلود توی ترد هست یا خیر؟ دانلود یم صفحه معمولی php که جیسون میده
  11. سلام مجدد توی فروشگاه همین انجمن هست
  12. سلام به روش زیر عمل کنید اول برید توی کنسول گوگل و یک ای دی برای ورود با اکانت گوگل بسازید(توی نت سرچ کنید آموزشش هست) و بزارید جای مقدار متغیر Id تیک کتابخانه های مورد نیاز رو هم بزنید MaterialDialog googleAccountManager Sub Globals Dim id As String = "ssssssssssssss" Dim sign As SignGoogle End Sub Sub Login_Google_Click sign.Initialize(id,Me) Dim ls1 As List ls1 = sign.GetAccountList Dim Builder As MaterialDialogBuilder Builder.Initialize("GoogleList") Builder.Typeface(Cod.MyFont,Cod.MyFont) Dim si As MaterialSimpleListItem Builder.Title("یک حساب انتخاب کنید") For i = 0 To ls1.Size -1 Dim cs As CSBuilder cs.Initialize.Size(13).Append(ls1.Get(i)).PopAll si.Initialize2("ic_account_circle_black_48dp", cs) si.BackgroundColor = Colors.White Builder.AddSimpleItem(si) Next Builder.Show End Sub Sub GoogleList_SimpleItemSelected (Dialog As MaterialDialog, Position As Int, Item As MaterialSimpleListItem) ToastMessageShow(Item.Content, False) sign.SelectAccount(Item.Content) sign.RequestSign("UserLogin") Dialog.Dismiss End Sub Sub UserLogin(Data As Map,Login As Boolean) Log(Data.Get("id")) Log(Data.Get("email")) Log(Data.Get("name")) Log(Data.Get("family_name")) Log(Data.Get("picture")) End Sub بعد یه کلاس هم بسازید با نام SignGoogle و این کدها رو بزارید جای کدهای توی کلاس Private Sub Class_Globals Private clientId As String : clientId = "" 'enter client id here 'Private clientSecret As String : clientSecret = "" 'client secret here Private AccessToken As String Private userInfoLink As String : userInfoLink = "https://www.googleapis.com/oauth2/v1/userinfo" Private m_GoogleAccountManager As clsB_GoogleAccountManager Private modules As Object Private evt As String Private l_GoogleAccounts() As Object End Sub 'Step 1 Public Sub Initialize(sClientID As String,module As Object) clientId = sClientID m_GoogleAccountManager.Initialize(0) modules = module End Sub 'Step 3 Sub SelectAccount(AccountName As String) For Each l_joAccount As JavaObject In l_GoogleAccounts If l_joAccount.GetField ("name") = AccountName Then Exit End If Next Dim l_sScopes As String = "email profile" Dim l_sAuthTokenType As String = $"oauth2:${l_sScopes}"$ Dim l_sAccessToken As String = m_GoogleAccountManager.getAuthToken_foreground(l_joAccount,l_sAuthTokenType) AccessToken = l_sAccessToken End Sub 'Step 2 Sub GetAccountList As List l_GoogleAccounts = m_GoogleAccountManager.getAccountsByType("com.google") If l_GoogleAccounts.Length = 0 Then Return Null Dim l_sAccountNames As List : l_sAccountNames.Initialize For Each l_joAccount As JavaObject In l_GoogleAccounts Dim l_sAccountName As String = l_joAccount.GetField ("name") l_sAccountNames.Add(l_sAccountName) Next Return l_sAccountNames End Sub 'Step 4 Sub RequestSign(Event As String) evt = Event ' Dim j As HttpJob ' j.Initialize("getUserDetails", Me) ' j.Download2(userInfoLink, Array As String("access_token",AccessToken)) ' Dim dl As PersianFastNetwork dl.initialize("dl").BuildGetQuery(userInfoLink,"getUserDetails") _ .addParametrs("access_token",AccessToken).executRequesAsString Cod.ProgressDialog_Show2("درحال دریافت اطلاعات...",False) End Sub Sub dl_onGetStringOkListener(Result As String , Tag As String ) ProgressDialogHide If Result <> Null Then Select Tag Case "GetAccessToken" Dim JSON As JSONParser Dim map1 As Map JSON.Initialize(Result) map1=JSON.NextObject AccessToken=map1.Get("access_token") CallSub3(modules,evt,map1,False) Case "getUserDetails" Dim JSON As JSONParser Dim map1 As Map JSON.Initialize(Result) map1 = JSON.NextObject CallSub3(modules,evt,map1,True) End Select End If End Sub موفق باشید
  13. سلام به روش زیر عمل کنید کدهای بیسیک Sub Process_Globals Dim cc As ContentChooser End Sub Sub Globals Dim fp As string Dim times As String = DateTime.GetYear(DateTime.Now)&DateTime.GetDayOfMonth(DateTime.Now)&DateTime.GetMonth(DateTime.Now)&DateTime.GetHour(DateTime.Now)&DateTime.GetMinute(DateTime.Now)&DateTime.GetSecond(DateTime.Now) End Sub Sub select_video_click cc.Show("video/*","Choose move") End Sub Sub GetPathFromContentResult(UriString As String) As String If UriString.StartsWith("/") Then Return UriString 'If the user used a file manager to choose the image Dim Cursor1 As Cursor Dim Uri1 As Uri Dim Proj() As String = Array As String("_data") Dim cr As ContentResolver cr.Initialize("") If UriString.StartsWith("content://com.android.providers.media.documents") Then Dim i As Int = UriString.IndexOf("%3A") Dim id As String = UriString.SubString(i + 3) Uri1.Parse("content://media/external/video/media") Cursor1 = cr.Query(Uri1, Proj, "_id = ?", Array As String(id), "") Else Uri1.Parse(UriString) Cursor1 = cr.Query(Uri1, Proj, "", Null, "") End If Cursor1.Position = 0 Dim res As String res = Cursor1.GetString("_data") Cursor1.Close Return res End Sub Sub Choose_Result (Success As Boolean, Dir As String, FileName As String) Dim Dirs As AriaFile Dirs.initialize2(GetPathFromContentResult(FileName)) fp = Dirs.GetPath End Sub Sub Send Dim download as PersianFastNetwork download.initialize("download").BuildUploadQuery("http://name.ir/upload.php","move") _ .addMultipartFile("move",fp).addMultipartParameter("moveName",times) _ .startUploadAsString End Sub Sub download_onStringUploadOK(response As String , Tag As String) Select Tag Case "move" Log(response) End Select End Sub کدهای PHP upload.php <?php // Path to move uploaded files $target_path = "move/"; // array for final json respone $response = array(); // getting server ip address $server_ip =$_SERVER['SERVER_NAME']; $scriptname=$_SERVER['SCRIPT_NAME']; $scriptpatch=substr($scriptname, 0, -10); // final file url that is being uploaded $Name =$_POST['Name']; if (isset($_FILES['move']['name'])) { $target_path = $target_path . $Name.$_FILES['move']['name']; // Throws exception incase file is not being moved if (!move_uploaded_file($_FILES['move']['tmp_name'], $target_path)) { // make error flag true $response['error'] = 'Error'; } else { $response['move_link'] = 'http://'.$server_ip.$scriptpatch.$target_path; }} echo json_encode($response); ?> توجه! این قسمت $scriptpatch=substr($scriptname, 0, -10); اون -10رو توجه کنید این قسمت تعدا حروف نام فایل php هست که اینجا upload.php هست و یه پوشه هم بنام move در کنار فایل php بسازید
  14. سلام مجدد این کلاس واسه کتابخانه زدین پال هست توش از OkHttp استفاده شده که کتابخانه شما با این مشکل داره اگر زحمت بکشید کدهاش رو تبدیل کنید به کتبخانه خودتون ممنون میشم هم قسمت جیسونش و هم دانلودش 2 تا کتابخانه رو هم گرفتم این لینک گیت هاب GitHub - Seyyed-Morteza-SeyyedAghaei/ZarinPal-Sample-For-B4A اینم کدهاش #Event : ResultPaymentRequest(Result As ResultPaymentRequest) #Event : ResultVerificationPayment(Result As ResultVerificationPayment) Private Sub Class_Globals Private MERCHANT_ID_PARAMS = "MerchantID" As String Private AMOUNT_PARAMS = "Amount" As String Private DESCRIPTION_PARAMS = "Description" As String Private CALLBACK_URL_PARAMS = "CallbackURL" As String Private MOBILE_PARAMS = "Mobile" As String Private EMAIL_PARAMS = "Email" As String Private AUTHORITY_PARAMS = "Authority" As String Private PAYMENT_GATEWAY_URL = "https://www.zarinpal.com/pg/StartPay/" As String Private PAYMENT_REQUEST_URL = "https://www.zarinpal.com/pg/rest/WebGate/PaymentRequest.json" As String Private VERIFICATION_PAYMENT_URL = "https://www.zarinpal.com/pg/rest/WebGate/PaymentVerification.json" As String Type ResultPaymentRequest(Status As Int,Authority As String,Url As String,Intent As Intent) Type ResultVerificationPayment(IsPaymentSuccess As Boolean,RefID As String,Payment As ZPaymentRequest) Type ZPaymentRequest(MerchantID As String,Amount As Long,Description As String,CallbackURL As String,Email As String,Mobile As String,Authority As String) Private vPayment As ZPaymentRequest Private event As String Private target As Object End Sub 'Initializes the object. You can add parameters to this method if needed. Public Sub Initialize(EventName As String,TargetModule As Object) event = EventName target = TargetModule End Sub Private Sub getPaymentRequestJson(ZPaymentRequest As ZPaymentRequest) As String Dim jg As JSONGenerator jg.Initialize(CreateMap(MERCHANT_ID_PARAMS : ZPaymentRequest.MerchantID,AMOUNT_PARAMS : ZPaymentRequest.Amount,DESCRIPTION_PARAMS : _ ZPaymentRequest.Description,CALLBACK_URL_PARAMS : ZPaymentRequest.CallbackURL,MOBILE_PARAMS : ZPaymentRequest.Mobile, _ EMAIL_PARAMS : ZPaymentRequest.Email)) Return jg.ToString End Sub Public Sub StartPayment(ZPaymentRequest As ZPaymentRequest) Dim SP As HttpJob SP.Initialize("StartPayment",Me) vPayment = ZPaymentRequest SP.PostString(PAYMENT_REQUEST_URL,getPaymentRequestJson(ZPaymentRequest)) SP.GetRequest.SetContentType("application/json") End Sub Private Sub JobDone(Job As HttpJob) If Job.Success Then Dim jp As JSONParser jp.Initialize(Job.GetString) Dim Result As Map = jp.NextObject Select Job.JobName Case "StartPayment" Dim Intent As Intent,Url As String = PAYMENT_GATEWAY_URL&Result.Get("Authority") Intent.Initialize(Intent.ACTION_VIEW,Url) Dim ResultPayment As ResultPaymentRequest ResultPayment.Initialize ResultPayment.Authority = Result.Get("Authority") ResultPayment.Intent = Intent ResultPayment.Status = Result.Get("Status") ResultPayment.Url = Url vPayment.Authority = ResultPayment.Authority CallSub2(target,event&"_ResultPaymentRequest",ResultPayment) Case "VerificationPayment" Dim ResultVarification As ResultVerificationPayment ResultVarification.Initialize ResultVarification.IsPaymentSuccess = True ResultVarification.RefID = Result.Get("RefID") ResultVarification.Payment = vPayment CallSubDelayed2(target,event&"_ResultVerificationPayment",ResultVarification) End Select Else Select Job.JobName Case "StartPayment" Try Dim ResultPayment As ResultPaymentRequest ResultPayment.Initialize ResultPayment.Authority = Null ResultPayment.Intent = Null ResultPayment.Status = Result.Get("Status") ResultPayment.Url = Null CallSubDelayed2(target,event&"_ResultPaymentRequest",ResultPayment) Catch Log(LastException) End Try Case "VerificationPayment" Try Dim ResultVarification As ResultVerificationPayment ResultVarification.Initialize ResultVarification.IsPaymentSuccess = False ResultVarification.RefID = Null ResultVarification.Payment = vPayment CallSubDelayed2(target,event&"_ResultVerificationPayment",ResultVarification) Catch Log(LastException) End Try End Select End If Job.Release End Sub Public Sub VerificationPayment(Intent As Intent) If Intent = Null Or Not(Intent.IsInitialized) Then Return Dim r As Reflector r.Target = Intent r.Target = r.RunMethod("getData") If r.Target = Null Or vPayment = Null Or Not(r.RunMethod("isHierarchical")) Then Return Dim VP As HttpJob VP.Initialize("VerificationPayment",Me) Dim jg As JSONGenerator Dim vAuthority As String = r.RunMethod2("getQueryParameter","Authority","java.lang.String") If vAuthority <> vPayment.Authority Or Not(r.RunMethod2("getQueryParameter","Status","java.lang.String") = "OK") Then Dim ResultVarification As ResultVerificationPayment ResultVarification.Initialize ResultVarification.IsPaymentSuccess = False ResultVarification.RefID = Null ResultVarification.Payment = vPayment CallSubDelayed2(target,event&"_ResultVerificationPayment",ResultVarification) End If jg.Initialize(CreateMap(AUTHORITY_PARAMS : vPayment.Authority,MERCHANT_ID_PARAMS : vPayment.MerchantID,AMOUNT_PARAMS : vPayment.Amount)) VP.PostString(VERIFICATION_PAYMENT_URL,jg.ToString) VP.GetRequest.SetContentType("application/json") End Sub ممنونم
  15. سلام چرا با کتابخانه OkHttp مشکل داره؟ Convert byte code - optimized dex. Error Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/internal/platform/JdkWithJettyBootPlatform$JettyNegoProvider; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/AsyncTimeout; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/AsyncTimeout$1; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/AsyncTimeout$2; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/AsyncTimeout$Watchdog; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/Base64; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/Buffer; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/Buffer$1; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/Buffer$2; UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.RuntimeException: Translation has been interrupted at com.android.dx.command.dexer.Main.processAllFiles(Main.java:689) at com.android.dx.command.dexer.Main.runMultiDex(Main.java:368) at com.android.dx.command.dexer.Main.run(Main.java:277) at com.android.dx.command.dexer.Main.main(Main.java:247) at com.android.dx.command.Main.main(Main.java:106) Caused by: java.lang.InterruptedException: Too many errors at com.android.dx.command.dexer.Main.processAllFiles(Main.java:681) ... 4 more